1 #define DWG_TYPE DWG_TYPE_DGNUNDERLAY
2 #include "common.c"
3
4 void
api_process(dwg_object * obj)5 api_process (dwg_object *obj)
6 {
7 int error;
8 BITCODE_BL class_version;
9 dwg_point_3d extrusion, ins_pt, scale;
10 BITCODE_RC flag;
11 BITCODE_RC contrast;
12 BITCODE_RC fade;
13 BITCODE_BL num_clip_verts;
14 dwg_point_2d* clip_verts;
15 BITCODE_BS num_clip_inverts;
16 dwg_point_2d *clip_inverts;
17 BITCODE_H definition_id;
18
19 dwg_ent_underlay *underlay = dwg_object_to_DGNUNDERLAY (obj);
20
21 CHK_ENTITY_3RD (underlay, DGNUNDERLAY, extrusion);
22 CHK_ENTITY_3RD (underlay, DGNUNDERLAY, ins_pt);
23 CHK_ENTITY_3RD (underlay, DGNUNDERLAY, scale);
24 CHK_ENTITY_TYPE (underlay, DGNUNDERLAY, flag, RC);
25 CHK_ENTITY_TYPE (underlay, DGNUNDERLAY, contrast, RC);
26 CHK_ENTITY_TYPE (underlay, DGNUNDERLAY, fade, RC);
27 CHK_ENTITY_TYPE (underlay, DGNUNDERLAY, num_clip_verts, BL);
28 if (!dwg_dynapi_entity_value (underlay, "DGNUNDERLAY", "clip_verts", &clip_verts, NULL))
29 fail ("DGNUNDERLAY.clip_verts");
30 else
31 {
32 for (BITCODE_BL i = 0; i < num_clip_verts; i++)
33 {
34 ok ("DGNUNDERLAY.clip_verts[%d]: (%f, %f)", i, clip_verts[i].x, clip_verts[i].y);
35 }
36 }
37 CHK_ENTITY_TYPE (underlay, DGNUNDERLAY, num_clip_inverts, BS);
38 if (!dwg_dynapi_entity_value (underlay, "DGNUNDERLAY", "clip_inverts", &clip_inverts, NULL))
39 fail ("DGNUNDERLAY.clip_inverts");
40 else
41 {
42 for (BITCODE_BL i = 0; i < num_clip_inverts; i++)
43 {
44 ok ("DGNUNDERLAY.clip_inverts[%d]: (%f, %f)", i, clip_inverts[i].x, clip_inverts[i].y);
45 }
46 }
47 CHK_ENTITY_H (underlay, DGNUNDERLAY, definition_id);
48 }
49