(root)/
libredwg-0.13/
test/
unit-testing/
blockstretchaction.c
       1  // looks stable, but some structs might be missing. indxf definitely broken
       2  #define DWG_TYPE DWG_TYPE_BLOCKSTRETCHACTION
       3  #include "common.c"
       4  
       5  void
       6  api_process (dwg_object *obj)
       7  {
       8    int error, isnew;
       9    BITCODE_BL i;
      10    BLOCKACTION_fields;
      11    BITCODE_BL num_pts;
      12    BITCODE_2RD *pts;
      13    BITCODE_BL num_hdls;
      14    BITCODE_H *hdls;
      15    BITCODE_BS *shorts;
      16    BITCODE_BL num_codes;
      17    BITCODE_BL *codes;
      18    BLOCKACTION_doubles_fields;
      19  
      20    Dwg_Version_Type dwg_version = obj->parent->header.version;
      21    // #ifdef DEBUG_CLASSES
      22    dwg_obj_blockstretchaction *_obj = dwg_object_to_BLOCKSTRETCHACTION (obj);
      23  
      24    // AcDbBlockAction
      25    CHK_ENTITY_3RD (_obj, BLOCKSTRETCHACTION, display_location);
      26    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, num_actions, BL);
      27    CHK_ENTITY_VECTOR_TYPE (_obj, BLOCKSTRETCHACTION, actions, num_actions, BL);
      28    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, num_deps, BL);
      29    CHK_ENTITY_HV (_obj, BLOCKSTRETCHACTION, deps, num_deps);
      30    // AcDbBlockStretchAction
      31    for (i = 0; i < 2; i++)
      32      {
      33        CHK_SUBCLASS_TYPE (_obj->conn_pts[i], BLOCKACTION_connectionpts, code,
      34                           BL);
      35        CHK_SUBCLASS_UTF8TEXT (_obj->conn_pts[i], BLOCKACTION_connectionpts,
      36                               name);
      37      }
      38    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, num_pts, BL);
      39    CHK_ENTITY_2DPOINTS (_obj, BLOCKSTRETCHACTION, pts, num_pts);
      40    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, num_hdls, BL);
      41    CHK_ENTITY_HV (_obj, BLOCKSTRETCHACTION, hdls, num_hdls);
      42    CHK_ENTITY_VECTOR_TYPE (_obj, BLOCKSTRETCHACTION, shorts, num_hdls, BS);
      43    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, num_codes, BL);
      44    CHK_ENTITY_VECTOR_TYPE (_obj, BLOCKSTRETCHACTION, codes, num_codes, BL);
      45    // ..
      46    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, action_offset_x, BD);
      47    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, action_offset_y, BD);
      48    CHK_ENTITY_TYPE (_obj, BLOCKSTRETCHACTION, angle_offset, BD);
      49    // #endif
      50  }