1 #define DWG_TYPE DWG_TYPE_DIMENSION_RADIUS
2 #include "common.c"
3
4 void
api_process(dwg_object * obj)5 api_process (dwg_object *obj)
6 {
7 int error;
8 double elevation, act_measurement, horiz_dir, lspace_factor, text_rotation,
9 ins_rotation, leader_len;
10 BITCODE_B flip_arrow1, flip_arrow2;
11 BITCODE_RC class_version, flag, flag1;
12 BITCODE_BS lspace_style, attachment;
13 char *user_text;
14 int isnew;
15 dwg_point_2d text_midpt, clone_ins_pt;
16 dwg_point_3d def_pt, first_arc_pt, extrusion, ins_scale;
17 BITCODE_H dimstyle, block;
18
19 dwg_ent_dim_radius *dim_radius = dwg_object_to_DIMENSION_RADIUS (obj);
20 dwg_ent_dim *dim = dwg_object_to_DIMENSION (obj);
21
22 /* common */
23 CHK_ENTITY_TYPE (dim, DIMENSION_RADIUS, class_version, RC);
24 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, lspace_style, BS);
25 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, lspace_factor, BD);
26 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, act_measurement, BD);
27 CHK_ENTITY_TYPE (dim, DIMENSION_RADIUS, attachment, BS);
28 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, elevation, BD);
29 CHK_ENTITY_3RD (dim, DIMENSION_RADIUS, extrusion);
30 CHK_ENTITY_2RD_W_OLD (dim, DIMENSION_RADIUS, clone_ins_pt);
31 CHK_ENTITY_2RD_W_OLD (dim, DIMENSION_RADIUS, text_midpt);
32 CHK_ENTITY_UTF8TEXT (dim, DIMENSION_RADIUS, user_text);
33 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, text_rotation, BD);
34 CHK_ENTITY_MAX (dim, DIMENSION_RADIUS, text_rotation, BD, MAX_ANGLE);
35 CHK_ENTITY_3RD_W_OLD (dim, DIMENSION_RADIUS, ins_scale);
36 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, ins_rotation, BD);
37 CHK_ENTITY_MAX (dim, DIMENSION_RADIUS, ins_rotation, BD, MAX_ANGLE);
38 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, horiz_dir, BD);
39 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, flip_arrow1, B);
40 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, flip_arrow2, B);
41 CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_RADIUS, flag1, RC);
42 CHK_ENTITY_TYPE (dim, DIMENSION_RADIUS, flag, RC);
43
44 /* radius */
45 CHK_ENTITY_3RD_W_OLD (dim_radius, DIMENSION_RADIUS, first_arc_pt);
46 CHK_ENTITY_TYPE (dim_radius, DIMENSION_RADIUS, leader_len, BD);
47 #ifdef USE_DEPRECATED_API
48 if (leader_len != dwg_ent_dim_radius_get_leader_length (dim_radius, &error)
49 || error)
50 fail ("old API dwg_ent_dim_radius_get_leader_length");
51 else
52 pass ();
53 #endif
54
55 CHK_ENTITY_H (dim_radius, DIMENSION_RADIUS, dimstyle);
56 CHK_ENTITY_H (dim_radius, DIMENSION_RADIUS, block);
57 }
58