Next: Objects, Previous: Usage, Up: GNU LibreDWG [Contents][Index]
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).
1 raw unsigned char, uint8_t
1 raw unsigned short int, uint16_t
1 raw unsigned long int, uint32_t
1 raw IEEE-754 double
1 bit
2 bits
1-3 bits
4 bits (for VIEW view_mode)
1 bit-encoded unsigned short
1 bit-encoded unsigned long (max 32bit)
1 bit-encoded unsigned 64bit long
1 bit-encoded double
1 bit-encoded double with default
1-4 modular chars
1-4 unsigned modular chars
1 modular short, max 2 words
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.
1 bitencoded thickness value
length + ASCIIZ string The default text type until r2004.
length + windows 2-byte wchar string (UCS-2). The default text type since r2007.
Fixed length buffer, which can include NUL characters.
Embedded fixed length string, which can include NUL characters.
handle-references
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]