Skip to content

Commit

Permalink
Log mlinestyle flag
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-josef-spacek authored and rurban committed Mar 28, 2024
1 parent 20c18f6 commit 77f1cd2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/dwg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8483,6 +8483,21 @@ enum {
MLINE_FLAGS_SUPPRESS_START_CAPS = 4,
MLINE_FLAGS_SUPPRESS_END_CAPS = 8,
};

enum {
MLINESTYLE_FLAG_FILL = 1,
MLINESTYLE_FLAG_MITERS = 2,
MLINESTYLE_FLAG_UNKNOWN_4 = 4,
MLINESTYLE_FLAG_UNKNOWN_8 = 8,
MLINESTYLE_FLAG_START_SQUARE_END = 16,
MLINESTYLE_FLAG_START_INNER_ARC = 32,
MLINESTYLE_FLAG_START_ROUND = 64,
MLINESTYLE_FLAG_UNKNOWN_128 = 128,
MLINESTYLE_FLAG_END_SQUARE = 256,
MLINESTYLE_FLAG_END_INNER_ARC = 512,
MLINESTYLE_FLAG_END_ROUND = 1024,
};

enum {
LIGHT_TYPE_DISTANT = 1,
LIGHT_TYPE_POINT = 2,
Expand Down
1 change: 1 addition & 0 deletions src/dwg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4844,6 +4844,7 @@ DWG_OBJECT (MLINESTYLE)
256 = End square (line) cap,
512 = End inner arcs cap,
1024 = End round (outer arcs) cap */
LOG_MLINESTYLE_FLAG
DXF { FIELD_T (description, 3); }
FIELD_CMC (fill_color, 62); /*!< default 256 */
#ifdef IS_DXF
Expand Down
27 changes: 27 additions & 0 deletions src/spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,33 @@
}
#endif

#ifndef LOG_MLINESTYLE_FLAG
# define LOG_MLINESTYLE_FLAG_W(w) \
if (_obj->flag & MLINESTYLE_FLAG_##w) \
LOG_TRACE (#w "(0x%x) ", MLINESTYLE_FLAG_##w)
# define LOG_MLINESTYLE_FLAG \
DECODER_OR_ENCODER \
{ \
if (_obj->flag) \
{ \
LOG_TRACE (" "); \
LOG_MLINESTYLE_FLAG_W (FILL); \
LOG_MLINESTYLE_FLAG_W (MITERS); \
LOG_MLINESTYLE_FLAG_W (UNKNOWN_4); \
LOG_MLINESTYLE_FLAG_W (UNKNOWN_8); \
LOG_MLINESTYLE_FLAG_W (START_SQUARE_END); \
LOG_MLINESTYLE_FLAG_W (START_INNER_ARC); \
LOG_MLINESTYLE_FLAG_W (START_ROUND); \
LOG_MLINESTYLE_FLAG_W (UNKNOWN_128); \
LOG_MLINESTYLE_FLAG_W (END_SQUARE); \
LOG_MLINESTYLE_FLAG_W (END_INNER_ARC); \
LOG_MLINESTYLE_FLAG_W (END_ROUND); \
LOG_FLAG_MAX (_obj->flag, 2047); \
LOG_TRACE ("\n"); \
} \
}
#endif

#ifndef LOG_MLINE_JUSTIFICATION
# define LOG_MLINE_JUSTIFICATION_W(w) \
if (_obj->justification == MLINE_JUSTIFICATION_##w) \
Expand Down

0 comments on commit 77f1cd2

Please sign in to comment.