(root)/
libredwg-0.13/
test/
unit-testing/
geopositionmarker.c
       1  // TODO DEBUGGING
       2  #define DWG_TYPE DWG_TYPE_GEOPOSITIONMARKER
       3  #include "common.c"
       4  
       5  void
       6  api_process (dwg_object *obj)
       7  {
       8    int error, isnew;
       9    BITCODE_BS class_version;
      10    BITCODE_3BD position;
      11    BITCODE_BD radius;
      12    BITCODE_BD landing_gap;
      13    BITCODE_T notes;
      14    BITCODE_RC text_alignment;
      15    BITCODE_B mtext_visible;
      16    BITCODE_B enable_frame_text;
      17    Dwg_Object *mtext;
      18  
      19    Dwg_Version_Type dwg_version = obj->parent->header.version;
      20  #ifdef DEBUG_CLASSES
      21    dwg_ent_geopositionmarker *_obj = dwg_object_to_GEOPOSITIONMARKER (obj);
      22  
      23    CHK_ENTITY_TYPE (_obj, GEOPOSITIONMARKER, class_version, BS);
      24    CHK_ENTITY_3RD (_obj, GEOPOSITIONMARKER, position);
      25    CHK_ENTITY_TYPE (_obj, GEOPOSITIONMARKER, radius, BD);
      26    CHK_ENTITY_TYPE (_obj, GEOPOSITIONMARKER, landing_gap, BD);
      27    CHK_ENTITY_TYPE (_obj, GEOPOSITIONMARKER, text_alignment, RC);
      28    CHK_ENTITY_TYPE (_obj, GEOPOSITIONMARKER, mtext_visible, B);
      29    CHK_ENTITY_TYPE (_obj, GEOPOSITIONMARKER, enable_frame_text, B);
      30    CHK_ENTITY_UTF8TEXT (_obj, GEOPOSITIONMARKER, notes);
      31  
      32    if (!dwg_dynapi_entity_value (_obj, "GEOPOSITIONMARKER", "mtext", &mtext,
      33                                  NULL))
      34      fail ("GEOPOSITIONMARKER.mtext");
      35    else if (mtext)
      36      {
      37        Dwg_Entity_MTEXT *sub = mtext->tio.entity->tio.MTEXT;
      38        if (mtext->fixedtype != DWG_TYPE_MTEXT)
      39          fail ("Wrong MTEXT.mtext.fixedtype %d", mtext->fixedtype);
      40      }
      41  #endif
      42  }