Next: , Previous: , Up: GNU LibreDWG   [Contents][Index]


3 Types

LibreDWG types map closely to the type system of the DWG file format. This chapter describes the enums and structs used to define the single DWG structure, which is passed around the functions (see Functions).

define: BITCODE_RC char

1 raw unsigned char, uint8_t

define: BITCODE_RS short

1 raw unsigned short int, uint16_t

define: BITCODE_RL long

1 raw unsigned long int, uint32_t

define: BITCODE_RD double

1 raw IEEE-754 double

define: BITCODE_B byte

1 bit

define: BITCODE_BB byte

2 bits

define: BITCODE_3B byte

1-3 bits

define: BITCODE_4BITS byte

4 bits (for VIEW view_mode)

define: BITCODE_BS short

1 bit-encoded unsigned short

define: BITCODE_BL long

1 bit-encoded unsigned long (max 32bit)

define: BITCODE_BLL uint64_t

1 bit-encoded unsigned 64bit long

define: BITCODE_BD double

1 bit-encoded double

define: BITCODE_DD double

1 bit-encoded double with default

define: BITCODE_MC long int

1-4 modular chars

define: BITCODE_UMC long unsigned int

1-4 unsigned modular chars

define: BITCODE_MS long unsigned int

1 modular short, max 2 words

define: BITCODE_BE double[3]

1 bitencoded extrusion vector.

Note that this specifies an OCS (Object Coordinate System) for each entity, with the default (0, 0, 1). An extrusion of (0, 0, -1) is typically caused by exploding a block inserted with a negative x scale, i.e. the sign of each X point needs to be flipped. For more see the vendor DXF documentation on OCS and programs/geom.c.

define: BITCODE_BT double

1 bitencoded thickness value

define: BITCODE_TV char*

length + ASCIIZ string The default text type until r2004.

define: BITCODE_TU wchar*

length + windows 2-byte wchar string (UCS-2). The default text type since r2007.

define: BITCODE_TF char*

Fixed length buffer, which can include NUL characters.

define: BITCODE_TFF char*

Embedded fixed length string, which can include NUL characters.

define: BITCODE_H void*

handle-references

define: BITCODE_CMC struct Dwg_Color

Dwg_Color struct with index or rgb, alpha and optional DBCOLOR handle, name, book_name.

[and some more]

Two types that do not derive from the type system of the DWG file format are the enums for return codes and error codes.

On non-C99 systems ensure that stdint.h and inttypes.h are available to use the proper C99 int32_t,... types, and not just the native fallback types int/long, which are different across platforms.


Next: Objects, Previous: Usage, Up: GNU LibreDWG   [Contents][Index]