1 #define DWG_TYPE DWG_TYPE_LEADER
2 #include "common.c"
3 
4 void
api_process(dwg_object * obj)5 api_process (dwg_object *obj)
6 {
7   int error;
8   dwg_point_3d origin, extrusion, x_direction, inspt_offset, endptproj;
9   dwg_point_3d *points;
10   BITCODE_B unknown_bit_1;
11   BITCODE_BS path_type;
12   BITCODE_BS annot_type;
13   BITCODE_BL i, num_points;
14   BITCODE_BD dimgap;
15   BITCODE_BD box_height;
16   BITCODE_BD box_width;
17   BITCODE_B hookline_dir;
18   BITCODE_B arrowhead_on;
19   BITCODE_BS arrowhead_type;
20   BITCODE_BD dimasz;
21   BITCODE_B unknown_bit_2;
22   BITCODE_B unknown_bit_3;
23   BITCODE_BS unknown_short_1;
24   BITCODE_BS byblock_color;
25   BITCODE_B hookline_on;
26   BITCODE_B unknown_bit_5;
27   BITCODE_H associated_annotation;
28   BITCODE_H dimstyle;
29 
30   dwg_ent_leader *leader = dwg_object_to_LEADER (obj);
31 
32   CHK_ENTITY_3RD_W_OLD (leader, LEADER, origin);
33   CHK_ENTITY_3RD_W_OLD (leader, LEADER, extrusion);
34   CHK_ENTITY_3RD_W_OLD (leader, LEADER, x_direction);
35   CHK_ENTITY_3RD_W_OLD (leader, LEADER, inspt_offset);
36   CHK_ENTITY_3RD (leader, LEADER, endptproj);
37 
38   CHK_ENTITY_TYPE (leader, LEADER, unknown_bit_1, B);
39   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, path_type, BS);
40   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, annot_type, BS);
41   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, num_points, BL);
42   if (!dwg_dynapi_entity_value (leader, "LEADER", "points", &points, NULL))
43     fail ("LEADER.points");
44   else
45     for (i = 0; i < leader->num_points; i++)
46       (void)points[i].z;
47   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, dimgap, BD);
48   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, box_height, BD);
49   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, box_width, BD);
50   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, hookline_dir, B);
51   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, arrowhead_on, B);
52   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, arrowhead_type, BS);
53   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, dimasz, BD);
54   CHK_ENTITY_TYPE (leader, LEADER, unknown_bit_2, B);
55   CHK_ENTITY_TYPE (leader, LEADER, unknown_bit_3, B);
56   CHK_ENTITY_TYPE (leader, LEADER, unknown_short_1, BS);
57   CHK_ENTITY_TYPE_W_OLD (leader, LEADER, byblock_color, BS);
58   CHK_ENTITY_TYPE (leader, LEADER, hookline_on, B);
59   CHK_ENTITY_TYPE (leader, LEADER, unknown_bit_5, B);
60 
61   CHK_ENTITY_H (leader, LEADER, associated_annotation);
62   CHK_ENTITY_H (leader, LEADER, dimstyle);
63 }
64