(root)/
libredwg-0.13/
test/
unit-testing/
dimension_ang3pt.c
       1  #define DWG_TYPE DWG_TYPE_DIMENSION_ANG3PT
       2  #include "common.c"
       3  
       4  void
       5  api_process (dwg_object *obj)
       6  {
       7    int error, isnew;
       8    double elevation, act_measurement, horiz_dir, lspace_factor, text_rotation,
       9        ins_rotation;
      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    dwg_point_2d text_midpt, clone_ins_pt, pt2d;
      15    dwg_point_3d def_pt, xline1_pt, xline2_pt, center_pt, extrusion, ins_scale,
      16        pt3d;
      17    BITCODE_H dimstyle, block;
      18  
      19    dwg_ent_dim_ang3pt *dim_ang3pt = dwg_object_to_DIMENSION_ANG3PT (obj);
      20    dwg_ent_dim *dim = dwg_object_to_DIMENSION (obj);
      21  
      22    /* common */
      23    CHK_ENTITY_TYPE (dim, DIMENSION_ANG3PT, class_version, RC);
      24    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, lspace_style, BS);
      25    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, lspace_factor, BD);
      26    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, act_measurement, BD);
      27    CHK_ENTITY_TYPE (dim, DIMENSION_ANG3PT, attachment, BS);
      28    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, elevation, BD);
      29    CHK_ENTITY_3RD (dim, DIMENSION_ANG3PT, extrusion);
      30    CHK_ENTITY_2RD_W_OLD (dim, DIMENSION_ANG3PT, clone_ins_pt);
      31    CHK_ENTITY_2RD_W_OLD (dim, DIMENSION_ANG3PT, text_midpt);
      32    CHK_ENTITY_UTF8TEXT (dim, DIMENSION_ANG3PT, user_text);
      33    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, text_rotation, BD);
      34    CHK_ENTITY_3RD_W_OLD (dim, DIMENSION_ANG3PT, ins_scale);
      35    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, ins_rotation, BD);
      36    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, horiz_dir, BD);
      37    CHK_ENTITY_MAX (dim, DIMENSION_ANG3PT, text_rotation, BD, MAX_ANGLE);
      38    CHK_ENTITY_MAX (dim, DIMENSION_ANG3PT, ins_rotation, BD, MAX_ANGLE);
      39    CHK_ENTITY_MAX (dim, DIMENSION_ANG3PT, horiz_dir, BD, MAX_ANGLE);
      40    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, flip_arrow1, B);
      41    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, flip_arrow2, B);
      42    CHK_ENTITY_TYPE_W_OLD (dim, DIMENSION_ANG3PT, flag1, RC);
      43    CHK_ENTITY_TYPE (dim, DIMENSION_ANG3PT, flag, RC);
      44  
      45    /* ang3pt */
      46    CHK_ENTITY_3RD_W_OLD (dim_ang3pt, DIMENSION_ANG3PT, def_pt);
      47    CHK_ENTITY_3RD (dim_ang3pt, DIMENSION_ANG3PT, center_pt);
      48  #ifdef USE_DEPRECATED_API
      49    dwg_ent_dim_ang3pt_get_first_arc_pt (dim_ang3pt, &pt3d, &error);
      50    if (error || memcmp (&center_pt, &pt3d, sizeof (center_pt)))
      51      fail ("old API dwg_ent_dim_ang3pt_get_first_arc_pt");
      52    else
      53      pass ();
      54  #endif
      55    CHK_ENTITY_3RD (dim_ang3pt, DIMENSION_ANG3PT, xline1_pt);
      56  #ifdef USE_DEPRECATED_API
      57    dwg_ent_dim_ang3pt_get_13_pt (dim_ang3pt, &pt3d, &error);
      58    if (error || memcmp (&xline1_pt, &pt3d, sizeof (xline1_pt)))
      59      fail ("old API dwg_ent_dim_ang3pt_get_13_pt");
      60    else
      61      pass ();
      62  #endif
      63    CHK_ENTITY_3RD (dim_ang3pt, DIMENSION_ANG3PT, xline2_pt);
      64  #ifdef USE_DEPRECATED_API
      65    dwg_ent_dim_ang3pt_get_14_pt (dim_ang3pt, &pt3d, &error);
      66    if (error || memcmp (&xline2_pt, &pt3d, sizeof (xline2_pt)))
      67      fail ("old API dwg_ent_dim_ang3pt_get_14_pt");
      68    else
      69      pass ();
      70  #endif
      71  
      72    CHK_ENTITY_H (dim_ang3pt, DIMENSION_ANG3PT, dimstyle);
      73    CHK_ENTITY_H (dim_ang3pt, DIMENSION_ANG3PT, block);
      74  }