Skip to content

Commit

Permalink
Log LTYPE shape flag
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-josef-spacek authored and rurban committed Mar 19, 2024
1 parent 22aab8a commit 85b6b88
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/dwg.h
Original file line number Diff line number Diff line change
Expand Up @@ -8379,6 +8379,12 @@ enum {
FLAG_POLYLINE_LT_PATTERN_CONTINUES = 128,
};

enum {
LTYPE_SHAPE_FLAG_ABS_ROTATION = 1,
LTYPE_SHAPE_FLAG_IS_TEXT = 2,
LTYPE_SHAPE_FLAG_IS_SHAPE = 4,
};

enum {
FLAG_LAYER_FROZEN = 1,
FLAG_LAYER_FROZEN_IN_NEW = 2,
Expand Down
2 changes: 2 additions & 0 deletions src/dwg.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3936,6 +3936,7 @@ DWG_TABLE (LTYPE)
SUB_FIELD_BD (dashes[rcount1],length, 49);
DXF {
SUB_FIELD_BS (dashes[rcount1],shape_flag, 74);
LOG_LTYPE_SHAPE_FLAG
if (_obj->dashes[rcount1].shape_flag) // eg BATTING
{
SUB_FIELD_BS (dashes[rcount1],complex_shapecode, 75);
Expand All @@ -3957,6 +3958,7 @@ DWG_TABLE (LTYPE)
SUB_FIELD_BD (dashes[rcount1],scale, 46);
SUB_FIELD_BD (dashes[rcount1],rotation, 50);
SUB_FIELD_BS (dashes[rcount1],shape_flag, 74);
LOG_LTYPE_SHAPE_FLAG
}
DECODER {
if (FIELD_VALUE (dashes[rcount1].shape_flag) & 2)
Expand Down
19 changes: 19 additions & 0 deletions src/spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,25 @@
}
#endif

#ifndef LOG_LTYPE_SHAPE_FLAG
# define LOG_LTYPE_SHAPE_FLAG_W(w) \
if (_obj->dashes[rcount1].shape_flag & LTYPE_SHAPE_FLAG_##w) \
LOG_TRACE (#w "(0x%x) ", LTYPE_SHAPE_FLAG_##w)
# define LOG_LTYPE_SHAPE_FLAG \
DECODER_OR_ENCODER \
{ \
if (_obj->dashes[rcount1].shape_flag) \
{ \
LOG_TRACE (" "); \
LOG_LTYPE_SHAPE_FLAG_W (ABS_ROTATION); \
LOG_LTYPE_SHAPE_FLAG_W (IS_TEXT); \
LOG_LTYPE_SHAPE_FLAG_W (IS_SHAPE); \
LOG_FLAG_MAX (_obj->dashes[rcount1].shape_flag, LTYPE_SHAPE_FLAG_IS_SHAPE); \
LOG_TRACE ("\n"); \
} \
}
#endif

#ifndef LOG_HORIZ_ALIGNMENT
# define LOG_HORIZ_ALIGNMENT_W(w) \
if (_obj->horiz_alignment == HORIZ_ALIGNMENT_##w) \
Expand Down

0 comments on commit 85b6b88

Please sign in to comment.