libUEMF
A portable library for reading and writing WMF, EMF and EMF+ files
|
#include <uemf.h>
Data Fields | |
uint32_t * | table |
Array Buffer for constructing the EMF in memory. | |
uint32_t * | stack |
handles are either on the stack or in the table | |
size_t | allocated |
Slots in the buffer. | |
size_t | chunk |
Number to add if a realloc is required. | |
uint32_t | sptr |
Pointer to next available handle in the stack. | |
uint32_t | top |
Highest slot occupied (currently) | |
uint32_t | peak |
Highest slot occupied (ever) | |
The various create functions need a place to put their handles, these are stored in the table below. We don't actually do anything much with these handles, that is up to whatever program finally plays back the EMF, but we do need to keep track of the numbers so that they are not accidentally reused. This structure is used for that, and all *_set functions that touch a handle reference it.
Stock objects are not used in this limited model, so libUEMF cannot detect if a handle is still in use. Nor can it tell when a handle has been deselected (by selecting another handle for the same type of graphic object, and thus made deleteable). End user code must keep track of this for itself.