1 #define DWG_TYPE DWG_TYPE_DGNUNDERLAY
2 #include "common.c"
3
4 void
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",
29 &clip_verts, NULL))
30 fail ("DGNUNDERLAY.clip_verts");
31 else
32 {
33 for (BITCODE_BL i = 0; i < num_clip_verts; i++)
34 {
35 ok ("DGNUNDERLAY.clip_verts[%d]: (%f, %f)", i, clip_verts[i].x,
36 clip_verts[i].y);
37 }
38 }
39 CHK_ENTITY_TYPE (underlay, DGNUNDERLAY, num_clip_inverts, BS);
40 if (!dwg_dynapi_entity_value (underlay, "DGNUNDERLAY", "clip_inverts",
41 &clip_inverts, NULL))
42 fail ("DGNUNDERLAY.clip_inverts");
43 else
44 {
45 for (BITCODE_BL i = 0; i < num_clip_inverts; i++)
46 {
47 ok ("DGNUNDERLAY.clip_inverts[%d]: (%f, %f)", i, clip_inverts[i].x,
48 clip_inverts[i].y);
49 }
50 }
51 CHK_ENTITY_H (underlay, DGNUNDERLAY, definition_id);
52 }