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).
BITCODE_RC
char ¶1 raw unsigned char, uint8_t
BITCODE_RS
short ¶1 raw unsigned short int, uint16_t
BITCODE_RL
long ¶1 raw unsigned long int, uint32_t
BITCODE_RD
double ¶1 raw IEEE-754 double
BITCODE_B
byte ¶1 bit
BITCODE_BB
byte ¶2 bits
BITCODE_3B
byte ¶1-3 bits
BITCODE_4BITS
byte ¶4 bits (for VIEW view_mode)
BITCODE_BS
short ¶1 bit-encoded unsigned short
BITCODE_BL
long ¶1 bit-encoded unsigned long (max 32bit)
BITCODE_BLL
uint64_t ¶1 bit-encoded unsigned 64bit long
BITCODE_BD
double ¶1 bit-encoded double
BITCODE_DD
double ¶1 bit-encoded double with default
BITCODE_MC
long int
¶1-4 modular chars
BITCODE_UMC
long unsigned int
¶1-4 unsigned modular chars
BITCODE_MS
long unsigned int
¶1 modular short, max 2 words
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.
BITCODE_BT
double ¶1 bitencoded thickness value
BITCODE_TV
char* ¶length + ASCIIZ string The default text type until r2004.
BITCODE_TU
wchar* ¶length + windows 2-byte wchar string (UCS-2). The default text type since r2007.
BITCODE_TF
char* ¶Fixed length buffer, which can include NUL characters.
BITCODE_TFF
char* ¶Embedded fixed length string, which can include NUL characters.
BITCODE_H
void* ¶handle-references
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.