[OSGeo-Discuss] How to get the value of TextElement and font size when using DgnLib ?

taibc taibc_coltech at yahoo.com
Thu Sep 27 00:19:47 PDT 2012


Hi friends,

In DgnLib, an core element and Text Element have the below structures. Do
you know which field can use to get the value of a Text Element ? 

typedef struct {
    int         offset;
    int         size;      //* Is this font size (such as: Time New Roman 13
?)*

    int         element_id;     /*!< Element number (zero based) */
    int         stype;          /*!< Structure type: (DGNST_*) */
    int         level;          /*!< Element Level: 0-63 */
    int         type;           /*!< Element type (DGNT_) */
    int         complex;        /*!< Is element complex? */
    int         deleted;        /*!< Is element deleted? */

    int         graphic_group;  /*!< Graphic group number */
    int         properties;     /*!< Properties: ORing of DGNPF_ flags */
    int         color;          /*!< Color index (0-255) */
    int         weight;         /*!< Line Weight (0-31) */
    int         style;          /*!< Line Style: One of DGNS_* values */

    int         attr_bytes;     /*!< Bytes of attribute data, usually zero.
*/
    unsigned char *attr_data;   /*!< Raw attribute data */

    int         raw_bytes;      /*!< Bytes of raw data, usually zero. */
    unsigned char *raw_data;    /*!< All raw element data including header.
*/
} DGNElemCore;

and 

typedef struct {
    DGNElemCore core;
    
    int         font_id;       /*!< Microstation font id, no list
available*/
    int         justification; /*!< Justification, see DGNJ_* */
    double      length_mult;   /*!< Char width in master (if square) */
    double      height_mult;   /*!< Char height in master units */
    double      rotation;      /*!< Counterclockwise rotation in degrees */
    DGNPoint    origin;        /*!< Bottom left corner of text. */
    char        string[1];     /*!< Actual text (length varies, \0
terminated*/
} DGNElemText;



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-get-the-value-of-TextElement-and-font-size-when-using-DgnLib-tp5004845.html
Sent from the OSGeo Discuss mailing list archive at Nabble.com.



More information about the Discuss mailing list