1 #define DWG_TYPE DWG_TYPE_LINE
2 #include "common.c"
3
4 void
5 api_process (dwg_object *obj)
6 {
7 int error;
8 double thickness;
9 dwg_point_3d pt3d, extrusion, start, end;
10 BITCODE_B z_is_zero;
11
12 dwg_ent_line *line = dwg_object_to_LINE (obj);
13
14 CHK_ENTITY_3RD (line, LINE, start);
15 #ifdef USE_DEPRECATED_API
16 dwg_ent_line_get_start_point (line, &pt3d, &error);
17 if (error || memcmp (&start, &pt3d, sizeof (dwg_point_3d)))
18 fail ("old API dwg_ent_line_get_start_point");
19 #endif
20
21 CHK_ENTITY_3RD (line, LINE, end);
22 #ifdef USE_DEPRECATED_API
23 dwg_ent_line_get_end_point (line, &pt3d, &error);
24 if (error || memcmp (&end, &pt3d, sizeof (dwg_point_3d)))
25 fail ("old API dwg_ent_line_get_end_point");
26 #endif
27
28 CHK_ENTITY_TYPE_W_OLD (line, LINE, thickness, RD);
29 CHK_ENTITY_3RD_W_OLD (line, LINE, extrusion);
30
31 CHK_ENTITY_TYPE (line, LINE, z_is_zero, B);
32 }