libUEMF
A portable library for reading and writing WMF, EMF and EMF+ files
|
Functions for manipulating WMF files and structures. More...
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string.h>
#include <iconv.h>
#include <wchar.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include "uwmf.h"
#include "uwmf_endian.h"
Functions | |
uint32_t | U_wmr_values (int idx) |
Look up the full numeric type of a WMR record by type. More... | |
char * | U_wmr_names (int idx) |
Look up the name of the WMR record by type. Returns U_WMR_INVALID if out of range. More... | |
char * | U_wmr_escnames (int idx) |
Text description of Escape record type. More... | |
int | wmr_arc_points (U_RECT16 rclBox16, U_POINT16 ArcStart16, U_POINT16 ArcEnd16, int *f1, int f2, U_PAIRF *center, U_PAIRF *start, U_PAIRF *end, U_PAIRF *size) |
Derive from bounding box and start and end arc, for WMF arc, chord, or pie records, the center, start, and end points, and the bounding rectangle. More... | |
void | U_sanerect16 (U_RECT16 rc, double *left, double *top, double *right, double *bottom) |
A U_RECT16 may have its values swapped, L<->R and T<->B, this extracts the leftmost as left, and so forth. More... | |
uint32_t | U_wmr_size (const U_METARECORD *record) |
Get record size in bytes from U_WMR* record, which may not be aligned. More... | |
U_FONT * | U_FONT_set (int16_t Height, int16_t Width, int16_t Escapement, int16_t Orientation, int16_t Weight, uint8_t Italic, uint8_t Underline, uint8_t StrikeOut, uint8_t CharSet, uint8_t OutPrecision, uint8_t ClipPrecision, uint8_t Quality, uint8_t PitchAndFamily, char *FaceName) |
Create and return a U_FONT structure. More... | |
U_PLTNTRY | U_PLTNTRY_set (U_COLORREF Color) |
Create and return a U_PLTENTRY structure. More... | |
U_PALETTE * | U_PLTENTRY_set (uint16_t Start, uint16_t NumEntries, U_PLTNTRY *PalEntries) |
Create and return a U_PALETTE structure. More... | |
U_PEN | U_PEN_set (uint16_t Style, uint16_t Width, U_COLORREF Color) |
Create and return a U_PEN structure. More... | |
U_RECT16 | U_RECT16_set (U_POINT16 ul, U_POINT16 lr) |
Create and return a U_RECT16 structure from Upper Left and Lower Right corner points. More... | |
U_BITMAP16 * | U_BITMAP16_set (const int16_t Type, const int16_t Width, const int16_t Height, const int16_t LineN, const uint8_t BitsPixel, const char *Bits) |
Create and return a U_BITMAP16 structure. More... | |
U_SCAN * | U_SCAN_set (uint16_t count, uint16_t top, uint16_t bottom, uint16_t *ScanLines) |
Create and return a U_SCAN structure. More... | |
U_REGION * | U_REGION_set (int16_t Size, int16_t sCount, int16_t sMax, U_RECT16 sRect, uint16_t *aScans) |
Create and return a U_REGION structure. More... | |
U_WLOGBRUSH | U_WLOGBRUSH_set (uint16_t Style, U_COLORREF Color, uint16_t Hatch) |
Create and return a U_WLOGBRUSH structure. More... | |
U_PAIRF * | U_PAIRF_set (float x, float y) |
Create and return a U_PAIRF structure. More... | |
int16_t | U_16_checksum (int16_t *buf, int count) |
Calculate the int16_t checksum of the buffer for the number of positions specified. This is XOR of all values. More... | |
void | dumpwht (char *string, unsigned int *handle, WMFHANDLES *wht) |
Dump a WMFHANDLES structure. Not for use in production code. More... | |
int16_t * | dx16_set (int32_t height, uint32_t weight, uint32_t members) |
Make up an approximate dx array to pass to U_WMREXTTEXTOUT_set(), based on character height and weight. More... | |
uint32_t | U_wmr_properties (uint32_t type) |
Look up the properties (a bit map) of a type of WMR record. Bits that may be set are defined in "Draw Properties" in uemf.h, they are U_DRAW_NOTEMPTY, etc.. More... | |
char * | wmr_dup (const char *wmr) |
Duplicate an WMR record. More... | |
int | wmf_start (const char *name, const uint32_t initsize, const uint32_t chunksize, WMFTRACK **wt) |
Start constructing an wmf in memory. Supply the file name and initial size. More... | |
int | wmf_free (WMFTRACK **wt) |
Release memory for an wmf structure in memory. Call this after wmf_finish(). More... | |
int | wmf_finish (WMFTRACK *wt) |
Finalize the emf in memory and write it to the file. More... | |
int | wmf_readdata (const char *filename, char **contents, size_t *length) |
Retrieve contents of an WMF file by name. More... | |
int | wmf_append (U_METARECORD *rec, WMFTRACK *wt, int freerec) |
Append an WMF record to a wmf in memory. This may reallocate buf memory. More... | |
int | wmf_header_append (U_METARECORD *rec, WMFTRACK *wt, int freerec) |
Append an WMF header to a wmf in memory. This may reallocate buf memory. WMF header is not a normal record, method used to figure out its size is different. More... | |
int | wmf_htable_create (uint32_t initsize, uint32_t chunksize, WMFHANDLES **wht) |
Create a handle table. Entries filled with 0 are empty, entries >0 hold a handle. More... | |
int | wmf_htable_delete (uint32_t *ih, WMFHANDLES *wht) |
Delete an entry from the handle table. Move it back onto the stack. The specified slot is filled with a 0. More... | |
int | wmf_htable_insert (uint32_t *ih, WMFHANDLES *wht) |
Returns the index of the first free slot. Call realloc() if needed. The slot is set to handle (indicates occupied) and the peak value is adjusted. More... | |
int | wmf_htable_free (WMFHANDLES **wht) |
Free all memory in an htable. Sets the pointer to NULL. More... | |
char * | wdeleteobject_set (uint32_t *ihObject, WMFHANDLES *wht) |
Allocate and construct a U_WMRDELETEOBJECT record and also delete the requested object from the table. Use this function instead of calling U_WMRDELETEOBJECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wselectobject_set (uint32_t ihObject, WMFHANDLES *wht) |
Allocate and construct a U_WMRSELECTOBJECT record, checks that the handle specified is one that can actually be selected. Use this function instead of calling U_WMRSELECTOBJECT_set() directly. Object Pointer in WMF (caller) is 0->N, so is record, so no correction to 1->N+1 needed here. More... | |
char * | wcreatepenindirect_set (uint32_t *ihPen, WMFHANDLES *wht, U_PEN pen) |
Allocate and construct a U_WMRCREATEPENINDIRECT record, create a handle and returns it Use this function instead of calling U_WMRCREATEPENINDIRECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wcreatebrushindirect_set (uint32_t *ihBrush, WMFHANDLES *wht, U_WLOGBRUSH lb) |
Allocate and construct a U_WMRCREATEBRUSHINDIRECT record, create a handle and returns it Use this function instead of calling U_WMRCREATEBRUSHINDIRECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wcreatedibpatternbrush_srcdib_set (uint32_t *ihBrush, WMFHANDLES *wht, const uint32_t iUsage, const U_BITMAPINFO *Bmi, const uint32_t cbPx, const char *Px) |
Allocate and construct a U_WMRDIBCREATEPATTERNBRUSH record from a DIB. Use this function instead of calling U_WMRDIBCREATEPATTERNBRUSH_set() directly. More... | |
char * | wcreatedibpatternbrush_srcbm16_set (uint32_t *ihBrush, WMFHANDLES *wht, const uint32_t iUsage, const U_BITMAP16 *Bm16) |
Allocate and construct a U_WMRCREATEPATTERNBRUSH record from a U_BITMAP16 object. Use this function instead of calling U_WMRCREATEPATTERNBRUSH_set() directly. More... | |
char * | wcreatepatternbrush_set (uint32_t *ihBrush, WMFHANDLES *wht, U_BITMAP16 *Bm16, char *Pattern) |
Allocate and construct a U_WMRCREATEPATTERNBRUSH record, create a handle and returns it Use this function instead of calling U_WMRCREATEPATTERNBRUSH_set() directly. Warning - application support for U_WMRCREATEPATTERNBRUSH is spotty, better to use U_WMRDIBCREATEPATTERNBRUSH. More... | |
char * | wcreatefontindirect_set (uint32_t *ihFont, WMFHANDLES *wht, U_FONT *uf) |
Allocate and construct a U_WMRCREATEFONTINDIRECT record, create a handle and returns it Use this function instead of calling U_WMRCREATEFONTINDIRECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wcreatepalette_set (uint32_t *ihPal, WMFHANDLES *wht, U_PALETTE *up) |
Allocate and construct a U_WMRCREATEPALETTE record, create a handle and returns it Use this function instead of calling U_WMRCREATEPALETTE_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wsetpaletteentries_set (uint32_t *ihPal, WMFHANDLES *wht, const U_PALETTE *Palettes) |
Allocate and construct a U_WMRSETPALENTRIES record, create a handle and returns it Use this function instead of calling U_WMRSETPALENTRIES_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wcreateregion_set (uint32_t *ihReg, WMFHANDLES *wht, const U_REGION *Region) |
Allocate and construct a U_WMRCREATEREGION record, create a handle and returns it Use this function instead of calling U_WMRCREATEREGION() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here. More... | |
char * | wbegin_path_set (void) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly. More... | |
char * | wend_path_set (void) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly. More... | |
char * | wlinecap_set (int32_t Type) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly. More... | |
char * | wlinejoin_set (int32_t Type) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly. More... | |
char * | wmiterlimit_set (int32_t limit) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly. More... | |
char * | U_WMRHEADER_set (U_PAIRF *size, unsigned int dpi) |
Set up fields for a (placeable) WMR_HEADER. Most of the fields are blank and are not set until all is written. Typically values are something like (8.5,11.0), 1440 (Letter paper, 1440 DPI). The scaled paper size must fit in the range 0<->32767 inclusive, because it must be represented by a signed 16bit number. If the size + dpi result in out of range values a failure will result. More... | |
char * | U_WMREOF_set (void) |
Allocate and construct a U_WMREOF record. More... | |
char * | U_WMRSETBKCOLOR_set (U_COLORREF Color) |
Create and return a U_WMRSETBKCOLOR record. More... | |
char * | U_WMRSETBKMODE_set (uint16_t Mode) |
Create and return a U_WMRSETBKMODE record. More... | |
char * | U_WMRSETMAPMODE_set (uint16_t Mode) |
Create and return a U_WMRSETMAPMODE record. More... | |
char * | U_WMRSETROP2_set (uint16_t Mode) |
Create and return a U_WMRSETROP2 record. More... | |
char * | U_WMRSETRELABS_set (void) |
Allocate and construct a U_WMRSETRELABS record. More... | |
char * | U_WMRSETPOLYFILLMODE_set (uint16_t Mode) |
Create and return a U_WMRSETPOLYFILLMODE record. More... | |
char * | U_WMRSETSTRETCHBLTMODE_set (uint16_t Mode) |
Create and return a U_WMRSETSTRETCHBLTMODE record. More... | |
char * | U_WMRSETTEXTCHAREXTRA_set (uint16_t Mode) |
Create and return a U_WMRSETTEXTCHAREXTRA record. More... | |
char * | U_WMRSETTEXTCOLOR_set (U_COLORREF Color) |
Create and return a U_WMRSETTEXTCOLOR record. More... | |
char * | U_WMRSETTEXTJUSTIFICATION_set (uint16_t Count, uint16_t Extra) |
Create and return a U_WMRSETTEXTJUSTIFICATION record. More... | |
char * | U_WMRSETWINDOWORG_set (U_POINT16 coord) |
Create and return a U_WMRSETWINDOWORG record. More... | |
char * | U_WMRSETWINDOWEXT_set (U_POINT16 extent) |
Create and return a U_WMRSETWINDOWEXT record. More... | |
char * | U_WMRSETVIEWPORTORG_set (U_POINT16 coord) |
Create and return a U_WMRSETVIEWPORTORG record. More... | |
char * | U_WMRSETVIEWPORTEXT_set (U_POINT16 extent) |
Create and return a U_WMRSETVIEWPORTEXT record. More... | |
char * | U_WMROFFSETWINDOWORG_set (U_POINT16 offset) |
Create and return a U_WMROFFSETWINDOWORG record. More... | |
char * | U_WMRSCALEWINDOWEXT_set (U_POINT16 Denom, U_POINT16 Num) |
Create and return a U_WMRSCALEWINDOWEXT record. More... | |
char * | U_WMROFFSETVIEWPORTORG_set (U_POINT16 offset) |
Create and return a U_WMROFFSETVIEWPORTORG record. More... | |
char * | U_WMRSCALEVIEWPORTEXT_set (U_POINT16 Denom, U_POINT16 Num) |
Create and return a U_WMRSCALEVIEWPORTEXT record. More... | |
char * | U_WMRLINETO_set (U_POINT16 coord) |
Create and return a U_WMRLINETO record. More... | |
char * | U_WMRMOVETO_set (U_POINT16 coord) |
Create and return a U_WMRMOVETO record. More... | |
char * | U_WMREXCLUDECLIPRECT_set (U_RECT16 rect) |
Create and return a U_WMREXCLUDECLIPRECT record. More... | |
char * | U_WMRINTERSECTCLIPRECT_set (U_RECT16 rect) |
Create and return a U_WMRINTERSECTCLIPRECT record. More... | |
char * | U_WMRARC_set (U_POINT16 StartArc, U_POINT16 EndArc, U_RECT16 rect) |
Create and return a U_WMRARC record. More... | |
char * | U_WMRELLIPSE_set (U_RECT16 rect) |
Create and return a U_WMRELLIPSE record. More... | |
char * | U_WMRFLOODFILL_set (uint16_t Mode, U_COLORREF Color, U_POINT16 coord) |
Create and return a U_WMRFLOODFILL record. More... | |
char * | U_WMRPIE_set (U_POINT16 Radial1, U_POINT16 Radial2, U_RECT16 rect) |
Create and return a U_WMRPIE record. More... | |
char * | U_WMRRECTANGLE_set (U_RECT16 rect) |
Create and return a U_WMRRECTANGLE record. More... | |
char * | U_WMRROUNDRECT_set (int16_t Width, int16_t Height, U_RECT16 rect) |
Create and return a U_WMRROUNDRECT record. More... | |
char * | U_WMRPATBLT_set (U_POINT16 Dst, U_POINT16 cwh, uint32_t dwRop3) |
Allocate and construct a U_WMRPATBLT record. More... | |
char * | U_WMRSAVEDC_set (void) |
Allocate and construct a U_WMRSAVEDC record. More... | |
char * | U_WMRSETPIXEL_set (U_COLORREF Color, U_POINT16 Coord) |
Allocate and construct a U_WMRSETPIXEL record. More... | |
char * | U_WMROFFSETCLIPRGN_set (U_POINT16 offset) |
Allocate and construct a U_WMROFFSETCLIPRGN record. More... | |
char * | U_WMRTEXTOUT_set (U_POINT16 Dst, char *string) |
Allocate and construct a U_WMRTEXTOUT record. More... | |
char * | U_WMRBITBLT_set (U_POINT16 Dst, U_POINT16 cwh, U_POINT16 Src, uint32_t dwRop3, const U_BITMAP16 *Bm16) |
Allocate and construct a U_WMRBITBLT record. Note that unlike U_EMRBITBLT there is no scaling available - the Src and Dst rectangles must be the same size. More... | |
char * | U_WMRSTRETCHBLT_set (U_POINT16 Dst, U_POINT16 cDst, U_POINT16 Src, U_POINT16 cSrc, uint32_t dwRop3, const U_BITMAP16 *Bm16) |
Allocate and construct a U_WMRSTRETCHBLT record. More... | |
char * | U_WMRPOLYGON_set (uint16_t Length, const U_POINT16 *Data) |
Allocate and construct a U_WMRPOLYGON record. More... | |
char * | U_WMRPOLYLINE_set (uint16_t Length, const U_POINT16 *Data) |
Allocate and construct a U_WMRPOLYLINE record. More... | |
char * | U_WMRESCAPE_set (uint16_t Escape, uint16_t Length, const void *Data) |
Allocate and construct a U_WMRESCAPE record. WARNING! Only three Escape record types are fully supported: SETLINECAP, SETLINEJOIN, SETMITERLIMIT. Even these should not be set here directly, instead use the wsetlinecap_set(), wsetlinejoin_set(), or wsetmiterlimit_set() functions. Escape records created with this function, with the exception of the three named above, will not have the byte orders in Data adjusted automatically. The user code must set Data to be little endian no matter what the endianness of the current platform where the user code is running. More... | |
char * | U_WMRRESTOREDC_set (int16_t DC) |
Allocate and construct a U_WMRRESTOREDC record. More... | |
char * | U_WMRFILLREGION_set (uint16_t Region, uint16_t Brush) |
Allocate and construct a U_WMRFILLREGION record. More... | |
char * | U_WMRFRAMEREGION_set (uint16_t Region, uint16_t Brush, int16_t Height, int16_t Width) |
Allocate and construct a U_WMRFRAMEREGION record. More... | |
char * | U_WMRINVERTREGION_set (uint16_t Region) |
Allocate and construct a U_WMRINVERTREGION record. More... | |
char * | U_WMRPAINTREGION_set (uint16_t Region) |
Allocate and construct a U_WMRPAINTREGION record. More... | |
char * | U_WMRSELECTCLIPREGION_set (uint16_t Region) |
Allocate and construct a U_WMRSELECTCLIPREGION record. More... | |
char * | U_WMRSELECTOBJECT_set (uint16_t object) |
Allocate and construct a U_WMRSELECTOBJECT record. More... | |
char * | U_WMRSETTEXTALIGN_set (uint16_t Mode) |
Allocate and construct a U_WMRSETTEXTALIGN record. More... | |
char * | U_WMRDRAWTEXT_set (void) |
char * | U_WMRCHORD_set (U_POINT16 Radial1, U_POINT16 Radial2, U_RECT16 rect) |
Create and return a U_WMRCHORD record. More... | |
char * | U_WMRSETMAPPERFLAGS_set (uint32_t Mode) |
Allocate and construct a U_WMRSETMAPPERFLAGS record. More... | |
char * | U_WMREXTTEXTOUT_set (U_POINT16 Dst, int16_t Length, uint16_t Opts, const char *string, int16_t *dx, U_RECT16 rect) |
Allocate and construct a U_WMREXTTEXTOUT record. More... | |
char * | U_WMRSETDIBTODEV_set (void) |
Allocate and construct a U_WMRSETDIBTODEV record. More... | |
char * | U_WMRSELECTPALETTE_set (uint16_t Palette) |
Allocate and construct a U_WMRSELECTPALETTE record. More... | |
char * | U_WMRREALIZEPALETTE_set (void) |
Allocate and construct a U_WMRREALIZEPALETTE record. More... | |
char * | U_WMRANIMATEPALETTE_set (U_PALETTE *Palette) |
Allocate and construct a U_WMRSETPALENTRIES record. More... | |
char * | U_WMRSETPALENTRIES_set (const U_PALETTE *Palette) |
Allocate and construct a U_WMRSETPALENTRIES record. More... | |
char * | U_WMRPOLYPOLYGON_set (const uint16_t nPolys, const uint16_t *aPolyCounts, const U_POINT16 *Points) |
Allocate and construct a U_WMR_POLYPOLYGON record. More... | |
char * | U_WMRRESIZEPALETTE_set (uint16_t Palette) |
Allocate and construct a U_WMRRESIZEPALETTE record. More... | |
char * | U_WMRDIBBITBLT_set (U_POINT16 Dst, U_POINT16 cwh, U_POINT16 Src, uint32_t dwRop3, const U_BITMAPINFO *Bmi, uint32_t cbPx, const char *Px) |
Allocate and construct a U_WMRDIBITBLT record. More... | |
char * | U_WMRDIBSTRETCHBLT_set (U_POINT16 Dst, U_POINT16 cDst, U_POINT16 Src, U_POINT16 cSrc, uint32_t dwRop3, const U_BITMAPINFO *Bmi, uint32_t cbPx, const char *Px) |
Allocate and construct a U_WMRSTRETCHDIB record. More... | |
char * | U_WMRDIBCREATEPATTERNBRUSH_set (const uint16_t Style, const uint16_t iUsage, const U_BITMAPINFO *Bmi, const uint32_t cbPx, const char *Px, const U_BITMAP16 *Bm16) |
Allocate and construct a U_WMRDIBCREATEPATTERNBRUSH record. Accepts an image as either a DIB (Bmi/CbPx/Px defined) or a Bitmap16 (Bm16 defined). More... | |
char * | U_WMRSTRETCHDIB_set (U_POINT16 Dst, U_POINT16 cDst, U_POINT16 Src, U_POINT16 cSrc, uint16_t cUsage, uint32_t dwRop3, const U_BITMAPINFO *Bmi, uint32_t cbPx, const char *Px) |
Allocate and construct a U_WMRSTRETCHDIB record. More... | |
char * | U_WMREXTFLOODFILL_set (uint16_t Mode, U_COLORREF Color, U_POINT16 coord) |
Create and return a U_WMREXTFLOODFILL record. More... | |
char * | U_WMRDELETEOBJECT_set (uint16_t object) |
Create and return a U_WMRDELETEOBJECT record. More... | |
char * | U_WMRCREATEPALETTE_set (U_PALETTE *Palette) |
Create and return a U_WMRCREATEPALETTE record. More... | |
char * | U_WMRCREATEPATTERNBRUSH_set (U_BITMAP16 *Bm16, char *Pattern) |
Allocate and construct a U_WMRCREATEPATTERNBRUSH record. Warning - application support for U_WMRCREATEPATTERNBRUSH is spotty, better to use U_WMRDIBCREATEPATTERNBRUSH. More... | |
char * | U_WMRCREATEPENINDIRECT_set (U_PEN pen) |
Allocate and construct a U_WMRCREATEPENINDIRECT record. More... | |
char * | U_WMRCREATEFONTINDIRECT_set (U_FONT *font) |
Allocate and construct a U_WMRCREATEFONTINDIRECT record. More... | |
char * | U_WMRCREATEBRUSHINDIRECT_set (U_WLOGBRUSH brush) |
Allocate and construct a U_WMRCREATEBRUSHINDIRECT record. More... | |
char * | U_WMRCREATEBITMAPINDIRECT_set (void) |
char * | U_WMRCREATEBITMAP_set (void) |
char * | U_WMRCREATEREGION_set (const U_REGION *region) |
Allocate and construct a U_WMRCREATEREGION record. More... | |
int16_t * | dx16_get (int32_t height, uint32_t weight, uint32_t members) |
Make up an approximate dx array to pass to U_WMREXTTEXTOUT_get(), based on character height and weight. More... | |
size_t | U_WMRRECSAFE_get (const char *contents, const char *blimit) |
Return the size of a WMF record, or 0 if it is found to be invalid. A valid record will have a size that does not cause it to extend beyond the end of data in memory. A valid record will not be smaller than the smallest possible WMF record. More... | |
void | U_BITMAPCOREHEADER_get (const char *BmiCh, int32_t *Size, int32_t *Width, int32_t *Height, int32_t *BitCount) |
Return parameters from a bitmapcoreheader. All are returned as 32 bit integers, regardless of their internal representation. More... | |
void | U_BITMAPINFOHEADER_get (const char *Bmih, uint32_t *Size, int32_t *Width, int32_t *Height, uint32_t *Planes, uint32_t *BitCount, uint32_t *Compression, uint32_t *SizeImage, int32_t *XPelsPerMeter, int32_t *YPelsPerMeter, uint32_t *ClrUsed, uint32_t *ClrImportant) |
Return parameters from a bitinfoheader. All are returned as 32 bit integers, regardless of their internal representation. More... | |
int | wget_DIB_params (const char *dib, const char **px, const U_RGBQUAD **ct, int32_t *numCt, int32_t *width, int32_t *height, int32_t *colortype, int32_t *invert) |
Assume a packed DIB and get the parameters from it, use by DBI_to_RGBA() More... | |
int | wmfheader_get (const char *contents, const char *blimit, U_WMRPLACEABLE *Placeable, U_WMRHEADER *Header) |
Get data from a (placeable) WMR_HEADER. More... | |
int | U_WMREOF_get (const char *contents) |
Get data from a U_WMREOF record. More... | |
int | U_WMRSETBKCOLOR_get (const char *contents, U_COLORREF *Color) |
Retrieve values from a U_WMRSETBKCOLOR record. More... | |
int | U_WMRSETBKMODE_get (const char *contents, uint16_t *Mode) |
Retrieve values from a U_WMRSETBKMODE record. More... | |
int | U_WMRSETMAPMODE_get (const char *contents, uint16_t *Mode) |
Retrieve values from a U_WMRSETMAPMODE record. More... | |
int | U_WMRSETROP2_get (const char *contents, uint16_t *Mode) |
Retrieve values from a U_WMRSETROP2 record. More... | |
int | U_WMRSETRELABS_get (const char *contents) |
Get data from a U_WMRSETRELABS record. More... | |
int | U_WMRSETPOLYFILLMODE_get (const char *contents, uint16_t *Mode) |
Retrieve values from a U_WMRSETPOLYFILLMODE record. More... | |
int | U_WMRSETSTRETCHBLTMODE_get (const char *contents, uint16_t *Mode) |
Retrieve values from a U_WMRSETSTRETCHBLTMODE record. More... | |
int | U_WMRSETTEXTCHAREXTRA_get (const char *contents, uint16_t *Mode) |
Retrieve values from a U_WMRSETTEXTCHAREXTRA record. More... | |
int | U_WMRSETTEXTCOLOR_get (const char *contents, U_COLORREF *Color) |
Retrieve values from a U_WMRSETTEXTCOLOR record. More... | |
int | U_WMRSETTEXTJUSTIFICATION_get (const char *contents, uint16_t *Count, uint16_t *Extra) |
Retrieve values from a U_WMRSETTEXTJUSTIFICATION record. More... | |
int | U_WMRSETWINDOWORG_get (const char *contents, U_POINT16 *coord) |
Retrieve values from a U_WMRSETWINDOWORG record. More... | |
int | U_WMRSETWINDOWEXT_get (const char *contents, U_POINT16 *extent) |
Retrieve values from a U_WMRSETWINDOWEXT record. More... | |
int | U_WMRSETVIEWPORTORG_get (const char *contents, U_POINT16 *coord) |
Retrieve values from a U_WMRSETVIEWPORTORG record. More... | |
int | U_WMRSETVIEWPORTEXT_get (const char *contents, U_POINT16 *extent) |
Retrieve values from a U_WMRSETVIEWPORTEXT record. More... | |
int | U_WMROFFSETWINDOWORG_get (const char *contents, U_POINT16 *offset) |
Retrieve values from a U_WMROFFSETWINDOWORG record. More... | |
int | U_WMRSCALEWINDOWEXT_get (const char *contents, U_POINT16 *Denom, U_POINT16 *Num) |
Retrieve values from a U_WMRSCALEWINDOWEXT record. More... | |
int | U_WMROFFSETVIEWPORTORG_get (const char *contents, U_POINT16 *offset) |
Retrieve values from a U_WMROFFSETVIEWPORTORG record. More... | |
int | U_WMRSCALEVIEWPORTEXT_get (const char *contents, U_POINT16 *Denom, U_POINT16 *Num) |
Retrieve values from a U_WMRSCALEVIEWPORTEXT record. More... | |
int | U_WMRLINETO_get (const char *contents, U_POINT16 *coord) |
Retrieve values from a U_WMRLINETO record. More... | |
int | U_WMRMOVETO_get (const char *contents, U_POINT16 *coord) |
Retrieve values from a U_WMRMOVETO record. More... | |
int | U_WMREXCLUDECLIPRECT_get (const char *contents, U_RECT16 *rect) |
Retrieve values from a U_WMREXCLUDECLIPRECT record. More... | |
int | U_WMRINTERSECTCLIPRECT_get (const char *contents, U_RECT16 *rect) |
Retrieve values from a U_WMRINTERSECTCLIPRECT record. More... | |
int | U_WMRARC_get (const char *contents, U_POINT16 *StartArc, U_POINT16 *EndArc, U_RECT16 *rect) |
Retrieve values from a U_WMRARC record. More... | |
int | U_WMRELLIPSE_get (const char *contents, U_RECT16 *rect) |
Retrieve values from a U_WMRELLIPSE record. More... | |
int | U_WMRFLOODFILL_get (const char *contents, uint16_t *Mode, U_COLORREF *Color, U_POINT16 *coord) |
Retrieve values from a U_WMRFLOODFILL record. More... | |
int | U_WMRPIE_get (const char *contents, U_POINT16 *Radial1, U_POINT16 *Radial2, U_RECT16 *rect) |
Retrieve values from a U_WMRPIE record. More... | |
int | U_WMRRECTANGLE_get (const char *contents, U_RECT16 *rect) |
Retrieve values from a U_WMRRECTANGLE record. More... | |
int | U_WMRROUNDRECT_get (const char *contents, int16_t *Width, int16_t *Height, U_RECT16 *rect) |
Retrieve values from a U_WMRROUNDRECT record. More... | |
int | U_WMRPATBLT_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cwh, uint32_t *dwRop3) |
Get data from a U_WMRPATBLT record. More... | |
int | U_WMRSAVEDC_get (const char *contents) |
Get data from a U_WMRSAVEDC record. More... | |
int | U_WMRSETPIXEL_get (const char *contents, U_COLORREF *Color, U_POINT16 *Coord) |
Get data from a U_WMRSETPIXEL record. More... | |
int | U_WMROFFSETCLIPRGN_get (const char *contents, U_POINT16 *offset) |
Get data from a U_WMROFFSETCLIPRGN record. More... | |
int | U_WMRTEXTOUT_get (const char *contents, U_POINT16 *Dst, int16_t *Length, const char **string) |
Get data from a U_WMRTEXTOUT record. More... | |
int | U_WMRBITBLT_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cwh, U_POINT16 *Src, uint32_t *dwRop3, U_BITMAP16 *Bm16, const char **px) |
Get data from a U_WMRBITBLT record. Note that unlike U_EMRBITBLT there is no scaling available - the Src and Dst rectangles must be the same size. More... | |
int | U_WMRSTRETCHBLT_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cDst, U_POINT16 *Src, U_POINT16 *cSrc, uint32_t *dwRop3, U_BITMAP16 *Bm16, const char **px) |
Get data from a U_WMRSTRETCHBLT record. More... | |
int | U_WMRPOLYGON_get (const char *contents, uint16_t *Length, const char **Data) |
Get data from a U_WMRPOLYGON record. More... | |
int | U_WMRPOLYLINE_get (const char *contents, uint16_t *Length, const char **Data) |
Get data from a U_WMRPOLYLINE record. More... | |
int | U_WMRESCAPE_get (const char *contents, uint16_t *Escape, uint16_t *Length, const char **Data) |
Get data from a U_WMRESCAPE record. WARNING! Only three Escape record types are fully supported: SETLINECAP, SETLINEJOIN, SETMITERLIMIT. Even these should not be set here directly, instead use the wsetlinecap_get(), wsetlinejoin_get(), or wsetmiterlimit_get() functions. Escape records created with this function, with the exception of the three named above, will not have the byte orders in Data adjusted automatically. The user code must set Data to be little endian no matter what the endianness of the current platform where the user code is running. More... | |
int | U_WMRRESTOREDC_get (const char *contents, int16_t *DC) |
Get data from a U_WMRRESTOREDC record. More... | |
int | U_WMRFILLREGION_get (const char *contents, uint16_t *Region, uint16_t *Brush) |
Get data from a U_WMRFILLREGION record. More... | |
int | U_WMRFRAMEREGION_get (const char *contents, uint16_t *Region, uint16_t *Brush, int16_t *Height, int16_t *Width) |
Get data from a U_WMRFRAMEREGION record. More... | |
int | U_WMRINVERTREGION_get (const char *contents, uint16_t *Region) |
Get data from a U_WMRINVERTREGION record. More... | |
int | U_WMRPAINTREGION_get (const char *contents, uint16_t *Region) |
Get data from a U_WMRPAINTREGION record. More... | |
int | U_WMRSELECTCLIPREGION_get (const char *contents, uint16_t *Region) |
Get data from a U_WMRSELECTCLIPREGION record. More... | |
int | U_WMRSELECTOBJECT_get (const char *contents, uint16_t *Object) |
Get data from a U_WMRSELECTOBJECT record. More... | |
int | U_WMRSETTEXTALIGN_get (const char *contents, uint16_t *Mode) |
Get data from a U_WMRSETTEXTALIGN record. More... | |
int | U_WMRDRAWTEXT_get (void) |
int | U_WMRCHORD_get (const char *contents, U_POINT16 *Radial1, U_POINT16 *Radial2, U_RECT16 *rect) |
Retrieve values from a U_WMRCHORD record. More... | |
int | U_WMRSETMAPPERFLAGS_get (const char *contents, uint32_t *Mode) |
Get data from a U_WMRSETMAPPERFLAGS record. More... | |
int | U_WMREXTTEXTOUT_get (const char *contents, U_POINT16 *Dst, int16_t *Length, uint16_t *Opts, const char **string, const int16_t **dx, U_RECT16 *rect) |
Get data from a U_WMREXTTEXTOUT record. More... | |
int | U_WMRSETDIBTODEV_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cwh, U_POINT16 *Src, uint16_t *cUsage, uint16_t *ScanCount, uint16_t *StartScan, const char **dib) |
Get data from a U_WMRSETDIBTODEV record. More... | |
int | U_WMRSELECTPALETTE_get (const char *contents, uint16_t *Palette) |
Get data from a U_WMRSELECTPALETTE record. More... | |
int | U_WMRREALIZEPALETTE_get (const char *contents) |
Get data from a U_WMRREALIZEPALETTE record. More... | |
int | U_WMRANIMATEPALETTE_get (const char *contents, U_PALETTE *Palette, const char **PalEntries) |
Get data from a U_WMRSETPALENTRIES record. More... | |
int | U_WMRSETPALENTRIES_get (const char *contents, U_PALETTE *Palette, const char **PalEntries) |
Get data from a U_WMRSETPALENTRIES record. More... | |
int | U_WMRPOLYPOLYGON_get (const char *contents, uint16_t *nPolys, const uint16_t **aPolyCounts, const char **Points) |
Get data from a U_WMR_POLYPOLYGON record. More... | |
int | U_WMRRESIZEPALETTE_get (const char *contents, uint16_t *Palette) |
Get data from a U_WMRRESIZEPALETTE record. More... | |
int | U_WMRDIBBITBLT_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cwh, U_POINT16 *Src, uint32_t *dwRop3, const char **dib) |
Get data from a U_WMRDIBITBLT record. More... | |
int | U_WMRDIBSTRETCHBLT_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cDst, U_POINT16 *Src, U_POINT16 *cSrc, uint32_t *dwRop3, const char **dib) |
Get data from a U_WMRSTRETCHDIB record. More... | |
int | U_WMRDIBCREATEPATTERNBRUSH_get (const char *contents, uint16_t *Style, uint16_t *cUsage, const char **Bm16, const char **dib) |
Get data from a U_WMRDIBCREATEPATTERNBRUSH record. Returns an image as either a DIB (Bmi/CbPx/Px defined) or a Bitmap16 (Bm16 defined). More... | |
int | U_WMRSTRETCHDIB_get (const char *contents, U_POINT16 *Dst, U_POINT16 *cDst, U_POINT16 *Src, U_POINT16 *cSrc, uint16_t *cUsage, uint32_t *dwRop3, const char **dib) |
Get data from a U_WMRSTRETCHDIB record. More... | |
int | U_WMREXTFLOODFILL_get (const char *contents, uint16_t *Mode, U_COLORREF *Color, U_POINT16 *coord) |
Retrieve values from a U_WMREXTFLOODFILL record. More... | |
int | U_WMRDELETEOBJECT_get (const char *contents, uint16_t *Object) |
Get data from a U_WMRDELETEOBJECT record. More... | |
int | U_WMRCREATEPALETTE_get (const char *contents, U_PALETTE *Palette, const char **PalEntries) |
Retrieve values from a U_WMRCREATEPALETTE record. More... | |
int | U_WMRCREATEPATTERNBRUSH_get (const char *contents, U_BITMAP16 *Bm16, int *pasize, const char **Pattern) |
Get data from a U_WMRCREATEPATTERNBRUSH record. Warning - application support for U_WMRCREATEPATTERNBRUSH is spotty, better to use U_WMRDIBCREATEPATTERNBRUSH. More... | |
int | U_WMRCREATEPENINDIRECT_get (const char *contents, U_PEN *pen) |
Get data from a U_WMRCREATEPENINDIRECT record. More... | |
int | U_WMRCREATEFONTINDIRECT_get (const char *contents, const char **font) |
Get data from a U_WMRCREATEFONTINDIRECT record. More... | |
int | U_WMRCREATEBRUSHINDIRECT_get (const char *contents, const char **brush) |
Get data from a U_WMRCREATEBRUSHINDIRECT record. More... | |
int | U_WMRCREATEBITMAPINDIRECT_get (void) |
int | U_WMRCREATEBITMAP_get (void) |
int | U_WMRCREATEREGION_get (const char *contents, const char **Region) |
Get data from a U_WMRCREATEREGION record. More... | |
Functions for manipulating WMF files and structures.
[U_WMR*]_set all take data and return a pointer to memory holding the constructed record. If something goes wrong a NULL pointer is returned. [U_WMR*]_get takes a pointer to memory and returns the length of that record as well as the values from it (in the provided fields, passed by reference.) If something goes wrong, a size of 0 is returned.
The _set material comes first, then all of the _get material.
Compile with "U_VALGRIND" defined defined to enable code which lets valgrind check each record for uninitialized data.
Compile with "SOL8" defined for Solaris 8 or 9 (Sparc).
void dumpwht | ( | char * | string, |
unsigned int * | handle, | ||
WMFHANDLES * | wht | ||
) |
Dump a WMFHANDLES structure. Not for use in production code.
string | Text to output before dumping eht structure |
handle | Handle |
wht | WMFHANDLES structure to dump |
int16_t* dx16_get | ( | int32_t | height, |
uint32_t | weight, | ||
uint32_t | members | ||
) |
Make up an approximate dx array to pass to U_WMREXTTEXTOUT_get(), based on character height and weight.
Take abs. value of character height, get width by multiplying by 0.6, and correct weight approximately, with formula (measured on screen for one text line of Arial). Caller is responsible for free() on the returned pointer.
height | character height (absolute value will be used) |
weight | LF_Weight Enumeration (character weight) |
members | Number of entries to put into dx |
int16_t* dx16_set | ( | int32_t | height, |
uint32_t | weight, | ||
uint32_t | members | ||
) |
Make up an approximate dx array to pass to U_WMREXTTEXTOUT_set(), based on character height and weight.
Take abs. value of character height, get width by multiplying by 0.6, and correct weight approximately, with formula (measured on screen for one text line of Arial). Caller is responsible for free() on the returned pointer.
height | character height (absolute value will be used) |
weight | LF_Weight Enumeration (character weight) |
members | Number of entries to put into dx |
int16_t U_16_checksum | ( | int16_t * | buf, |
int | count | ||
) |
Calculate the int16_t checksum of the buffer for the number of positions specified. This is XOR of all values.
buf | array of uint16_t values |
count | number of members in buf |
U_BITMAP16* U_BITMAP16_set | ( | const int16_t | Type, |
const int16_t | Width, | ||
const int16_t | Height, | ||
const int16_t | LineN, | ||
const uint8_t | BitsPixel, | ||
const char * | Bits | ||
) |
Create and return a U_BITMAP16 structure.
Type | bitmap Type (not described at all in the WMF PDF) |
Width | bitmap width in pixels. |
Height | bitmap height in scan lines. |
LineN | each array line in Bits is a multiple of this (4 for a DIB) |
BitsPixel | number of adjacent color bits on each plane (R bits + G bits + B bits ????) |
Bits | bitmap pixel data. Bytes contained = (((Width * BitsPixel + 15) >> 4) << 1) * Height |
void U_BITMAPCOREHEADER_get | ( | const char * | BmiCh, |
int32_t * | Size, | ||
int32_t * | Width, | ||
int32_t * | Height, | ||
int32_t * | BitCount | ||
) |
Return parameters from a bitmapcoreheader. All are returned as 32 bit integers, regardless of their internal representation.
BmiCh | char * pointer to a U_BITMAPCOREHEADER. Note, data may not be properly aligned. |
Size | size of the coreheader in bytes |
Width; | Width of pixel array |
Height; | Height of pixel array |
BitCount | Pixel Format (BitCount Enumeration) |
void U_BITMAPINFOHEADER_get | ( | const char * | Bmih, |
uint32_t * | Size, | ||
int32_t * | Width, | ||
int32_t * | Height, | ||
uint32_t * | Planes, | ||
uint32_t * | BitCount, | ||
uint32_t * | Compression, | ||
uint32_t * | SizeImage, | ||
int32_t * | XPelsPerMeter, | ||
int32_t * | YPelsPerMeter, | ||
uint32_t * | ClrUsed, | ||
uint32_t * | ClrImportant | ||
) |
Return parameters from a bitinfoheader. All are returned as 32 bit integers, regardless of their internal representation.
Bmih | char * pointer to a U_BITMAPINFOHEADER. Note, data may not be properly aligned. |
Size | Structure size in bytes |
Width | Bitmap width in pixels |
Height | Bitmap height in pixels, may be negative. |
Planes | Planes (must be 1) |
BitCount | BitCount Enumeration (determines number of RBG colors) |
Compression | BI_Compression Enumeration |
SizeImage | Image size in bytes or 0 = "default size (calculated from geometry?)" |
XPelsPerMeter | X Resolution in pixels/meter |
YPelsPerMeter | Y Resolution in pixels/meter |
ClrUsed | Number of bmciColors in U_BITMAPINFO/U_BITMAPCOREINFO that are used by the bitmap |
ClrImportant | Number of bmciColors needed (0 means all). |
U_FONT* U_FONT_set | ( | int16_t | Height, |
int16_t | Width, | ||
int16_t | Escapement, | ||
int16_t | Orientation, | ||
int16_t | Weight, | ||
uint8_t | Italic, | ||
uint8_t | Underline, | ||
uint8_t | StrikeOut, | ||
uint8_t | CharSet, | ||
uint8_t | OutPrecision, | ||
uint8_t | ClipPrecision, | ||
uint8_t | Quality, | ||
uint8_t | PitchAndFamily, | ||
char * | FaceName | ||
) |
Create and return a U_FONT structure.
Height | Height in Logical units |
Width | Average Width in Logical units |
Escapement | Angle in 0.1 degrees betweem escapement vector and X axis |
Orientation | Angle in 0.1 degrees between baseline and X axis |
Weight | LF_Weight Enumeration |
Italic | LF_Italic Enumeration |
Underline | LF_Underline Enumeration |
StrikeOut | LF_StrikeOut Enumeration |
CharSet | LF_CharSet Enumeration |
OutPrecision | LF_OutPrecision Enumeration |
ClipPrecision | LF_ClipPrecision Enumeration |
Quality | LF_Quality Enumeration |
PitchAndFamily | LF_PitchAndFamily Enumeration |
FaceName | Name of font. ANSI Latin1, null terminated. |
Height | Height in Logical units |
Width | Average Width in Logical units |
Escapement | Angle in 0.1 degrees betweem escapement vector and X axis |
Orientation | Angle in 0.1 degrees between baseline and X axis |
Weight | LF_Weight Enumeration |
Italic | LF_Italic Enumeration |
Underline | LF_Underline Enumeration |
StrikeOut | LF_StrikeOut Enumeration |
CharSet | LF_CharSet Enumeration |
OutPrecision | LF_OutPrecision Enumeration |
ClipPrecision | LF_ClipPrecision Enumeration |
Quality | LF_Quality Enumeration |
PitchAndFamily | LF_PitchAndFamily Enumeration |
FaceName | Name of font. ANSI Latin1, null terminated. |
U_PAIRF* U_PAIRF_set | ( | float | x, |
float | y | ||
) |
U_PEN U_PEN_set | ( | uint16_t | Style, |
uint16_t | Width, | ||
U_COLORREF | Color | ||
) |
Create and return a U_PALETTE structure.
Start | Either 0x0300 or an offset into the Palette table |
NumEntries | Number of U_LOGPLTNTRY objects |
PalEntries | Pointer to array of PaletteEntry Objects |
Start | Either 0x0300 or an offset into the Palette table |
NumEntries | Number of U_LOGPLTNTRY objects |
PalEntries | Pointer to array of PaletteEntry Objects |
U_PLTNTRY U_PLTNTRY_set | ( | U_COLORREF | Color | ) |
Create and return a U_PLTENTRY structure.
Color | Color for the U_PLTENTRY |
Create and return a U_RECT16 structure from Upper Left and Lower Right corner points.
ul | upper left corner of rectangle |
lr | lower right corner of rectangle |
U_REGION* U_REGION_set | ( | int16_t | Size, |
int16_t | sCount, | ||
int16_t | sMax, | ||
U_RECT16 | sRect, | ||
uint16_t * | aScans | ||
) |
Create and return a U_REGION structure.
Size | aScans in bytes + regions size in bytes (size of this header plus all U_SCAN objects?) |
sCount | number of scan objects in region (docs say scanlines, but then no way to add sizes) |
sMax | largest number of points in any scan |
sRect | bounding rectangle |
aScans | series of U_SCAN objects to append. This is also an array of uint16_t, but should be handled as a bunch of U_SCAN objects tightly packed into the buffer. |
Size | aScans in bytes + regions size in bytes (size of this header plus all U_SCAN objects?) |
sCount | number of scan objects in region (docs say scanlines, but then no way to add sizes) |
sMax | largest number of points in any scan |
sRect | bounding rectangle |
aScans | series of U_SCAN objects to append. This is also an array of uint16_t, but should be handled as a bunch of U_SCAN objects tightly packed into the buffer. |
void U_sanerect16 | ( | U_RECT16 | rc, |
double * | left, | ||
double * | top, | ||
double * | right, | ||
double * | bottom | ||
) |
A U_RECT16 may have its values swapped, L<->R and T<->B, this extracts the leftmost as left, and so forth.
rc | U_RECT156 binary contents of an WMF file |
left | the leftmost of rc.left and rc.right |
top | the topmost of rc.top and rc.bottom |
right | the rightmost of rc.left and rc.right |
bottom | the bottommost of rc.top and rc.bottom |
U_SCAN* U_SCAN_set | ( | uint16_t | count, |
uint16_t | top, | ||
uint16_t | bottom, | ||
uint16_t * | ScanLines | ||
) |
Create and return a U_SCAN structure.
count | Number of entries in the ScanLines array |
top | Y coordinate of the top scanline |
bottom | Y coordinate of the bottom scanline |
ScanLines | Array of 16 bit left/right pairs, array has 2*count entries |
count | Number of entries in the ScanLines array |
top | Y coordinate of the top scanline |
bottom | Y coordinate of the bottom scanline |
ScanLines | Array of 16 bit left/right pairs, array has 2*count entries |
U_WLOGBRUSH U_WLOGBRUSH_set | ( | uint16_t | Style, |
U_COLORREF | Color, | ||
uint16_t | Hatch | ||
) |
Create and return a U_WLOGBRUSH structure.
Style | BrushStyle Enumeration |
Color | Brush Color value |
Hatch | HatchStyle Enumeration |
Style | BrushStyle Enumeration |
Color | Brush Color value |
Hatch | HatchStyle Enumeration |
char* U_wmr_escnames | ( | int | idx | ) |
Text description of Escape record type.
idx | Escape record type. |
char* U_wmr_names | ( | int | idx | ) |
Look up the name of the WMR record by type. Returns U_WMR_INVALID if out of range.
idx | WMR record type. |
uint32_t U_wmr_properties | ( | uint32_t | type | ) |
Look up the properties (a bit map) of a type of WMR record. Bits that may be set are defined in "Draw Properties" in uemf.h, they are U_DRAW_NOTEMPTY, etc..
type | WMR record type. If U_WMR_INVALID release memory. (There is no U_WMR_INVALID WMR record type) |
uint32_t U_wmr_size | ( | const U_METARECORD * | record | ) |
Get record size in bytes from U_WMR* record, which may not be aligned.
uint32_t U_wmr_values | ( | int | idx | ) |
Look up the full numeric type of a WMR record by type.
idx | WMR record type. |
< U_WMR_EOF
< U_WMR_SETBKCOLOR
< U_WMR_SETBKMODE
< U_WMR_SETMAPMODE
< U_WMR_SETROP2
< U_WMR_SETRELABS
< U_WMR_SETPOLYFILLMODE
< U_WMR_SETSTRETCHBLTMODE
< U_WMR_SETTEXTCHAREXTRA
< U_WMR_SETTEXTCOLOR
< U_WMR_SETTEXTJUSTIFICATION
< U_WMR_SETWINDOWORG
< U_WMR_SETWINDOWEXT
< U_WMR_SETVIEWPORTORG
< U_WMR_SETVIEWPORTEXT
< U_WMR_OFFSETWINDOWORG
< U_WMR_SCALEWINDOWEXT
< U_WMR_OFFSETVIEWPORTORG
< U_WMR_SCALEVIEWPORTEXT
< U_WMR_LINETO
< U_WMR_MOVETO
< U_WMR_EXCLUDECLIPRECT
< U_WMR_INTERSECTCLIPRECT
< U_WMR_ARC
< U_WMR_ELLIPSE
< U_WMR_FLOODFILL
< U_WMR_PIE
< U_WMR_RECTANGLE
< U_WMR_ROUNDRECT
< U_WMR_PATBLT
< U_WMR_SAVEDC
< U_WMR_SETPIXEL
< U_WMR_OFFSETCLIPRGN
< U_WMR_TEXTOUT
< U_WMR_BITBLT
< U_WMR_STRETCHBLT
< U_WMR_POLYGON
< U_WMR_POLYLINE
< U_WMR_ESCAPE
< U_WMR_RESTOREDC
< U_WMR_FILLREGION
< U_WMR_FRAMEREGION
< U_WMR_INVERTREGION
< U_WMR_PAINTREGION
< U_WMR_SELECTCLIPREGION
< U_WMR_SELECTOBJECT
< U_WMR_SETTEXTALIGN
< U_WMR_DRAWTEXT
< U_WMR_CHORD
< U_WMR_SETMAPPERFLAGS
< U_WMR_EXTTEXTOUT
< U_WMR_SETDIBTODEV
< U_WMR_SELECTPALETTE
< U_WMR_REALIZEPALETTE
< U_WMR_ANIMATEPALETTE
< U_WMR_SETPALENTRIES
< U_WMR_POLYPOLYGON
< U_WMR_RESIZEPALETTE
< U_WMR_3A
< U_WMR_3B
< U_WMR_3C
< U_WMR_3D
< U_WMR_3E
< U_WMR_3F
< U_WMR_DIBBITBLT
< U_WMR_DIBSTRETCHBLT
< U_WMR_DIBCREATEPATTERNBRUSH
< U_WMR_STRETCHDIB
< U_WMR_44
< U_WMR_45
< U_WMR_46
< U_WMR_47
< U_WMR_EXTFLOODFILL
< U_WMR_49
< U_WMR_4A
< U_WMR_4B
< U_WMR_4C
< U_WMR_4D
< U_WMR_4E
< U_WMR_4F
< U_WMR_50
< U_WMR_51
< U_WMR_52
< U_WMR_53
< U_WMR_54
< U_WMR_55
< U_WMR_56
< U_WMR_57
< U_WMR_58
< U_WMR_59
< U_WMR_5A
< U_WMR_5B
< U_WMR_5C
< U_WMR_5D
< U_WMR_5E
< U_WMR_5F
< U_WMR_60
< U_WMR_61
< U_WMR_62
< U_WMR_63
< U_WMR_64
< U_WMR_65
< U_WMR_66
< U_WMR_67
< U_WMR_68
< U_WMR_69
< U_WMR_6A
< U_WMR_6B
< U_WMR_6C
< U_WMR_6D
< U_WMR_6E
< U_WMR_6F
< U_WMR_70
< U_WMR_71
< U_WMR_72
< U_WMR_73
< U_WMR_74
< U_WMR_75
< U_WMR_76
< U_WMR_77
< U_WMR_78
< U_WMR_79
< U_WMR_7A
< U_WMR_7B
< U_WMR_7C
< U_WMR_7D
< U_WMR_7E
< U_WMR_7F
< U_WMR_80
< U_WMR_81
< U_WMR_82
< U_WMR_83
< U_WMR_84
< U_WMR_85
< U_WMR_86
< U_WMR_87
< U_WMR_88
< U_WMR_89
< U_WMR_8A
< U_WMR_8B
< U_WMR_8C
< U_WMR_8D
< U_WMR_8E
< U_WMR_8F
< U_WMR_90
< U_WMR_91
< U_WMR_92
< U_WMR_93
< U_WMR_94
< U_WMR_95
< U_WMR_96
< U_WMR_97
< U_WMR_98
< U_WMR_99
< U_WMR_9A
< U_WMR_9B
< U_WMR_9C
< U_WMR_9D
< U_WMR_9E
< U_WMR_9F
< U_WMR_A0
< U_WMR_A1
< U_WMR_A2
< U_WMR_A3
< U_WMR_A4
< U_WMR_A5
< U_WMR_A6
< U_WMR_A7
< U_WMR_A8
< U_WMR_A9
< U_WMR_AA
< U_WMR_AB
< U_WMR_AC
< U_WMR_AD
< U_WMR_AE
< U_WMR_AF
< U_WMR_B0
< U_WMR_B1
< U_WMR_B2
< U_WMR_B3
< U_WMR_B4
< U_WMR_B5
< U_WMR_B6
< U_WMR_B7
< U_WMR_B8
< U_WMR_B9
< U_WMR_BA
< U_WMR_BB
< U_WMR_BC
< U_WMR_BD
< U_WMR_BE
< U_WMR_BF
< U_WMR_C0
< U_WMR_C1
< U_WMR_C2
< U_WMR_C3
< U_WMR_C4
< U_WMR_C5
< U_WMR_C6
< U_WMR_C7
< U_WMR_C8
< U_WMR_C9
< U_WMR_CA
< U_WMR_CB
< U_WMR_CC
< U_WMR_CD
< U_WMR_CE
< U_WMR_CF
< U_WMR_D0
< U_WMR_D1
< U_WMR_D2
< U_WMR_D3
< U_WMR_D4
< U_WMR_D5
< U_WMR_D6
< U_WMR_D7
< U_WMR_D8
< U_WMR_D9
< U_WMR_DA
< U_WMR_DB
< U_WMR_DC
< U_WMR_DD
< U_WMR_DE
< U_WMR_DF
< U_WMR_E0
< U_WMR_E1
< U_WMR_E2
< U_WMR_E3
< U_WMR_E4
< U_WMR_E5
< U_WMR_E6
< U_WMR_E7
< U_WMR_E8
< U_WMR_E9
< U_WMR_EA
< U_WMR_EB
< U_WMR_EC
< U_WMR_ED
< U_WMR_EE
< U_WMR_EF
< U_WMR_DELETEOBJECT
< U_WMR_F1
< U_WMR_F2
< U_WMR_F3
< U_WMR_F4
< U_WMR_F5
< U_WMR_F6
< U_WMR_CREATEPALETTE
< U_WMR_CREATEBRUSH
< U_WMR_CREATEPATTERNBRUSH
< U_WMR_CREATEPENINDIRECT
< U_WMR_CREATEFONTINDIRECT
< U_WMR_CREATEBRUSHINDIRECT
< U_WMR_CREATEBITMAPINDIRECT
< U_WMR_CREATEBITMAP
< U_WMR_CREATEREGION
int U_WMRANIMATEPALETTE_get | ( | const char * | contents, |
U_PALETTE * | Palette, | ||
const char ** | PalEntries | ||
) |
Get data from a U_WMRSETPALENTRIES record.
contents | record to extract data from |
Palette | Redefines a set of RGB values for the current active Palette. |
PalEntries | Array of Palette Entries |
char* U_WMRANIMATEPALETTE_set | ( | U_PALETTE * | Palette | ) |
Allocate and construct a U_WMRSETPALENTRIES record.
Palette | Redefines a set of RGB values for the current active Palette. |
int U_WMRBITBLT_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
U_POINT16 * | cwh, | ||
U_POINT16 * | Src, | ||
uint32_t * | dwRop3, | ||
U_BITMAP16 * | Bm16, | ||
const char ** | px | ||
) |
Get data from a U_WMRBITBLT record. Note that unlike U_EMRBITBLT there is no scaling available - the Src and Dst rectangles must be the same size.
contents | record to extract data from |
Dst | Destination UL corner in logical units |
cwh | W & H for Dst and Src in logical units |
Src | Source UL corner in logical units |
dwRop3 | RasterOPeration Enumeration |
Bm16 | bitmap16 object (fields in it are all 0 if no bitmap is used) |
px | pointer to bitmap in memory, or NULL if not used |
char* U_WMRBITBLT_set | ( | U_POINT16 | Dst, |
U_POINT16 | cwh, | ||
U_POINT16 | Src, | ||
uint32_t | dwRop3, | ||
const U_BITMAP16 * | Bm16 | ||
) |
Allocate and construct a U_WMRBITBLT record. Note that unlike U_EMRBITBLT there is no scaling available - the Src and Dst rectangles must be the same size.
Dst | Destination UL corner in logical units |
cwh | W & H for Dst and Src in logical units |
Src | Source UL corner in logical units |
dwRop3 | RasterOPeration Enumeration |
Bm16 | (Optional) bitmap16 object |
int U_WMRCHORD_get | ( | const char * | contents, |
U_POINT16 * | Radial1, | ||
U_POINT16 * | Radial2, | ||
U_RECT16 * | rect | ||
) |
Retrieve values from a U_WMRCHORD record.
contents | record to extract data from |
Radial1 | Start of Chord |
Radial2 | End of Chord |
rect | Bounding rectangle. |
Create and return a U_WMRCHORD record.
Radial1 | Start of Chord |
Radial2 | End of Chord |
rect | Bounding rectangle. |
int U_WMRCREATEBITMAP_get | ( | void | ) |
in GDI and Wine, not in WMF manual.
char* U_WMRCREATEBITMAP_set | ( | void | ) |
in GDI and Wine, not in WMF manual.
int U_WMRCREATEBITMAPINDIRECT_get | ( | void | ) |
in GDI and Wine, not in WMF manual.
char* U_WMRCREATEBITMAPINDIRECT_set | ( | void | ) |
in GDI and Wine, not in WMF manual.
int U_WMRCREATEBRUSHINDIRECT_get | ( | const char * | contents, |
const char ** | brush | ||
) |
Get data from a U_WMRCREATEBRUSHINDIRECT record.
contents | record to extract data from |
brush | pointer to U_WLOGBRUSH structure in memory. Pointer may not be aligned properly for structure. |
char* U_WMRCREATEBRUSHINDIRECT_set | ( | U_WLOGBRUSH | brush | ) |
Allocate and construct a U_WMRCREATEBRUSHINDIRECT record.
brush | Parameters of the brush object to create. |
int U_WMRCREATEFONTINDIRECT_get | ( | const char * | contents, |
const char ** | font | ||
) |
Get data from a U_WMRCREATEFONTINDIRECT record.
contents | record to extract data from |
font | pointer to array of U_FONT structure in memory. Pointer may not be aligned properly for structure. |
char* U_WMRCREATEFONTINDIRECT_set | ( | U_FONT * | font | ) |
Allocate and construct a U_WMRCREATEFONTINDIRECT record.
font | Parameters of the font object to create. |
int U_WMRCREATEPALETTE_get | ( | const char * | contents, |
U_PALETTE * | Palette, | ||
const char ** | PalEntries | ||
) |
Retrieve values from a U_WMRCREATEPALETTE record.
contents | record to extract data from |
Palette | Create a Palette object. |
PalEntries | Array of Palette Entries |
char* U_WMRCREATEPALETTE_set | ( | U_PALETTE * | Palette | ) |
Create and return a U_WMRCREATEPALETTE record.
Palette | Create a Palette object. |
int U_WMRCREATEPATTERNBRUSH_get | ( | const char * | contents, |
U_BITMAP16 * | Bm16, | ||
int * | pasize, | ||
const char ** | Pattern | ||
) |
Get data from a U_WMRCREATEPATTERNBRUSH record. Warning - application support for U_WMRCREATEPATTERNBRUSH is spotty, better to use U_WMRDIBCREATEPATTERNBRUSH.
contents | record to extract data from |
Bm16 | truncated Bitmap16 structure from record, only tge first 14 bytes hold data. |
pasize | Number of bytes in Pattern |
Pattern | byte array pattern, described by Bm16, for brush |
char* U_WMRCREATEPATTERNBRUSH_set | ( | U_BITMAP16 * | Bm16, |
char * | Pattern | ||
) |
Allocate and construct a U_WMRCREATEPATTERNBRUSH record. Warning - application support for U_WMRCREATEPATTERNBRUSH is spotty, better to use U_WMRDIBCREATEPATTERNBRUSH.
Bm16 | Pointer to a Bitmap16 Object, only the first 10 bytes are used. |
Pattern | byte array pattern, described by Bm16, for brush |
int U_WMRCREATEPENINDIRECT_get | ( | const char * | contents, |
U_PEN * | pen | ||
) |
Get data from a U_WMRCREATEPENINDIRECT record.
contents | record to extract data from |
pen | pointer to a U_PEN object to fill. |
char* U_WMRCREATEPENINDIRECT_set | ( | U_PEN | pen | ) |
Allocate and construct a U_WMRCREATEPENINDIRECT record.
pen | Parameters of the pen object to create. |
int U_WMRCREATEREGION_get | ( | const char * | contents, |
const char ** | Region | ||
) |
Get data from a U_WMRCREATEREGION record.
contents | record to extract data from |
Region | pointer to U_REGION structure in memory. Pointer may not be aligned properly for structure. |
char* U_WMRCREATEREGION_set | ( | const U_REGION * | region | ) |
Allocate and construct a U_WMRCREATEREGION record.
region | Parameters of the region object to create. |
int U_WMRDELETEOBJECT_get | ( | const char * | contents, |
uint16_t * | Object | ||
) |
Get data from a U_WMRDELETEOBJECT record.
contents | record to extract data from |
Object | Index of object which is made active. |
char* U_WMRDELETEOBJECT_set | ( | uint16_t | object | ) |
Create and return a U_WMRDELETEOBJECT record.
object | Index of object to delete. |
int U_WMRDIBBITBLT_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
U_POINT16 * | cwh, | ||
U_POINT16 * | Src, | ||
uint32_t * | dwRop3, | ||
const char ** | dib | ||
) |
Get data from a U_WMRDIBITBLT record.
contents | record to extract data from |
Dst | Destination UL corner in logical units |
Src | Source UL corner in logical units |
cwh | W & H in logical units of Src and Dst |
dwRop3 | RasterOPeration Enumeration |
dib | pointer to dib in WMF in memory. Most likely not aligned. |
char* U_WMRDIBBITBLT_set | ( | U_POINT16 | Dst, |
U_POINT16 | cwh, | ||
U_POINT16 | Src, | ||
uint32_t | dwRop3, | ||
const U_BITMAPINFO * | Bmi, | ||
uint32_t | cbPx, | ||
const char * | Px | ||
) |
Allocate and construct a U_WMRDIBITBLT record.
Dst | Destination UL corner in logical units |
Src | Source UL corner in logical units |
cwh | W & H in logical units of Src and Dst |
dwRop3 | RasterOPeration Enumeration |
Bmi | (Optional) bitmapbuffer (U_BITMAPINFO section) |
cbPx | Size in bytes of pixel array (row STRIDE * height, there may be some padding at the end of each row) |
Px | (Optional) bitmapbuffer (pixel array section ) |
int U_WMRDIBCREATEPATTERNBRUSH_get | ( | const char * | contents, |
uint16_t * | Style, | ||
uint16_t * | cUsage, | ||
const char ** | Bm16, | ||
const char ** | dib | ||
) |
Get data from a U_WMRDIBCREATEPATTERNBRUSH record. Returns an image as either a DIB (Bmi/CbPx/Px defined) or a Bitmap16 (Bm16 defined).
contents | record to extract data from |
Style | BrushStyle Enumeration |
cUsage | DIBcolors Enumeration |
Bm16 | pointer to a U_BITMAP16 in WMF in memory. Most likely not aligned. NULL if dib is used instead. |
dib | pointer to a dib in WMF in memory. Most likely not aligned. NULL if Bm16 is used instead. |
char* U_WMRDIBCREATEPATTERNBRUSH_set | ( | const uint16_t | Style, |
const uint16_t | iUsage, | ||
const U_BITMAPINFO * | Bmi, | ||
const uint32_t | cbPx, | ||
const char * | Px, | ||
const U_BITMAP16 * | Bm16 | ||
) |
Allocate and construct a U_WMRDIBCREATEPATTERNBRUSH record. Accepts an image as either a DIB (Bmi/CbPx/Px defined) or a Bitmap16 (Bm16 defined).
Style | BrushStyle Enumeration |
iUsage | DIBcolors Enumeration |
Bm16 | pointer to U_BITMAP16 object for Style U_BS_PATTERN only |
cbPx | Size in bytes of pixel array (row stride * height, there may be some padding at the end of each row), for use with Bmi |
Px | bitmap buffer, for use with Bmi |
Bmi | pointer to U_BITMAPINFO for all Style OTHER than U_BS_PATTERN |
int U_WMRDIBSTRETCHBLT_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
U_POINT16 * | cDst, | ||
U_POINT16 * | Src, | ||
U_POINT16 * | cSrc, | ||
uint32_t * | dwRop3, | ||
const char ** | dib | ||
) |
Get data from a U_WMRSTRETCHDIB record.
contents | record to extract data from |
Dst | Destination UL corner in logical units |
cDst | Destination W & H in logical units |
Src | Source UL corner in logical units |
cSrc | Source W & H in logical units |
dwRop3 | RasterOPeration Enumeration |
dib | pointer to dib in WMF in memory. Most likely not aligned. |
char* U_WMRDIBSTRETCHBLT_set | ( | U_POINT16 | Dst, |
U_POINT16 | cDst, | ||
U_POINT16 | Src, | ||
U_POINT16 | cSrc, | ||
uint32_t | dwRop3, | ||
const U_BITMAPINFO * | Bmi, | ||
uint32_t | cbPx, | ||
const char * | Px | ||
) |
Allocate and construct a U_WMRSTRETCHDIB record.
Dst | Destination UL corner in logical units |
cDst | Destination W & H in logical units |
Src | Source UL corner in logical units |
cSrc | Source W & H in logical units |
dwRop3 | RasterOPeration Enumeration |
Bmi | (Optional) bitmapbuffer (U_BITMAPINFO section) |
cbPx | Size in bytes of pixel array (row STRIDE * height, there may be some padding at the end of each row) |
Px | (Optional) bitmapbuffer (pixel array section ) |
int U_WMRDRAWTEXT_get | ( | void | ) |
in GDI and Wine, not in WMF manual.
char* U_WMRDRAWTEXT_set | ( | void | ) |
in GDI and Wine, not in WMF manual..
int U_WMRELLIPSE_get | ( | const char * | contents, |
U_RECT16 * | rect | ||
) |
Retrieve values from a U_WMRELLIPSE record.
contents | record to extract data from |
rect | Bounding rectangle for Ellipse. |
char* U_WMRELLIPSE_set | ( | U_RECT16 | rect | ) |
Create and return a U_WMRELLIPSE record.
rect | Bounding rectangle for Ellipse. |
int U_WMREOF_get | ( | const char * | contents | ) |
Get data from a U_WMREOF record.
contents | record to extract data from |
char* U_WMREOF_set | ( | void | ) |
int U_WMRESCAPE_get | ( | const char * | contents, |
uint16_t * | Escape, | ||
uint16_t * | Length, | ||
const char ** | Data | ||
) |
Get data from a U_WMRESCAPE record. WARNING! Only three Escape record types are fully supported: SETLINECAP, SETLINEJOIN, SETMITERLIMIT. Even these should not be set here directly, instead use the wsetlinecap_get(), wsetlinejoin_get(), or wsetmiterlimit_get() functions. Escape records created with this function, with the exception of the three named above, will not have the byte orders in Data adjusted automatically. The user code must set Data to be little endian no matter what the endianness of the current platform where the user code is running.
contents | record to extract data from |
Escape | Escape function |
Length | Bytes in the Data |
Data | Array of Length bytes |
char* U_WMRESCAPE_set | ( | uint16_t | Escape, |
uint16_t | Length, | ||
const void * | Data | ||
) |
Allocate and construct a U_WMRESCAPE record. WARNING! Only three Escape record types are fully supported: SETLINECAP, SETLINEJOIN, SETMITERLIMIT. Even these should not be set here directly, instead use the wsetlinecap_set(), wsetlinejoin_set(), or wsetmiterlimit_set() functions. Escape records created with this function, with the exception of the three named above, will not have the byte orders in Data adjusted automatically. The user code must set Data to be little endian no matter what the endianness of the current platform where the user code is running.
Escape | Escape function |
Length | Bytes in the Data |
Data | Array of Length bytes |
int U_WMREXCLUDECLIPRECT_get | ( | const char * | contents, |
U_RECT16 * | rect | ||
) |
Retrieve values from a U_WMREXCLUDECLIPRECT record.
contents | record to extract data from |
rect | Exclude rect from clipping region. |
char* U_WMREXCLUDECLIPRECT_set | ( | U_RECT16 | rect | ) |
Create and return a U_WMREXCLUDECLIPRECT record.
rect | Exclude rect from clipping region. |
int U_WMREXTFLOODFILL_get | ( | const char * | contents, |
uint16_t * | Mode, | ||
U_COLORREF * | Color, | ||
U_POINT16 * | coord | ||
) |
Retrieve values from a U_WMREXTFLOODFILL record.
contents | record to extract data from |
Mode | FloodFill Enumeration. |
Color | Color to Fill with. |
coord | Location to start fill. |
char* U_WMREXTFLOODFILL_set | ( | uint16_t | Mode, |
U_COLORREF | Color, | ||
U_POINT16 | coord | ||
) |
Create and return a U_WMREXTFLOODFILL record.
Mode | FloodFill Enumeration. |
Color | Color to Fill with. |
coord | Location to start fill. |
int U_WMREXTTEXTOUT_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
int16_t * | Length, | ||
uint16_t * | Opts, | ||
const char ** | string, | ||
const int16_t ** | dx, | ||
U_RECT16 * | rect | ||
) |
Get data from a U_WMREXTTEXTOUT record.
contents | record to extract data from |
Dst | {X,Y} coordinates where the string is to be written. |
Length | Stringlength in bytes |
Opts | ExtTextOutOptions Flags |
string | String to write (Latin1 encoding) |
dx | Kerning information. Must have same number of entries as Length. |
rect | Used when when U_ETO_OPAQUE or U_ETO_CLIPPED bits are set in Opts |
char* U_WMREXTTEXTOUT_set | ( | U_POINT16 | Dst, |
int16_t | Length, | ||
uint16_t | Opts, | ||
const char * | string, | ||
int16_t * | dx, | ||
U_RECT16 | rect | ||
) |
Allocate and construct a U_WMREXTTEXTOUT record.
Dst | {X,Y} coordinates where the string is to be written. |
Length | Stringlength in bytes |
Opts | ExtTextOutOptions Flags |
string | String to write (Latin1 encoding) |
dx | Kerning information. Must have same number of entries as Length. |
rect | Used when when U_ETO_OPAQUE or U_ETO_CLIPPED bits are set in Opts |
int U_WMRFILLREGION_get | ( | const char * | contents, |
uint16_t * | Region, | ||
uint16_t * | Brush | ||
) |
Get data from a U_WMRFILLREGION record.
contents | record to extract data from |
Region | Region to fill |
Brush | Brush to fill with |
char* U_WMRFILLREGION_set | ( | uint16_t | Region, |
uint16_t | Brush | ||
) |
Allocate and construct a U_WMRFILLREGION record.
Region | Region to fill |
Brush | Brush to fill with |
int U_WMRFLOODFILL_get | ( | const char * | contents, |
uint16_t * | Mode, | ||
U_COLORREF * | Color, | ||
U_POINT16 * | coord | ||
) |
Retrieve values from a U_WMRFLOODFILL record.
contents | record to extract data from |
Mode | FloodFill Enumeration. |
Color | Color to Fill with. |
coord | Location to start fill. |
char* U_WMRFLOODFILL_set | ( | uint16_t | Mode, |
U_COLORREF | Color, | ||
U_POINT16 | coord | ||
) |
Create and return a U_WMRFLOODFILL record.
Mode | FloodFill Enumeration. |
Color | Color to Fill with. |
coord | Location to start fill. |
int U_WMRFRAMEREGION_get | ( | const char * | contents, |
uint16_t * | Region, | ||
uint16_t * | Brush, | ||
int16_t * | Height, | ||
int16_t * | Width | ||
) |
Get data from a U_WMRFRAMEREGION record.
contents | record to extract data from |
Region | Index of region to frame in object table |
Brush | Index of brush to use in frame in object table |
Height | in logical units (of frame) |
Width | in logical units (of frame) |
char* U_WMRFRAMEREGION_set | ( | uint16_t | Region, |
uint16_t | Brush, | ||
int16_t | Height, | ||
int16_t | Width | ||
) |
Allocate and construct a U_WMRFRAMEREGION record.
Region | Index of region to frame in object table |
Brush | Index of brush to use in frame in object table |
Height | in logical units (of frame) |
Width | in logical units (of frame) |
char* U_WMRHEADER_set | ( | U_PAIRF * | size, |
unsigned int | dpi | ||
) |
Set up fields for a (placeable) WMR_HEADER. Most of the fields are blank and are not set until all is written. Typically values are something like (8.5,11.0), 1440 (Letter paper, 1440 DPI). The scaled paper size must fit in the range 0<->32767 inclusive, because it must be represented by a signed 16bit number. If the size + dpi result in out of range values a failure will result.
size | Pointer to page size (if NULL, not a placeable header) in inches. Values must be positive and scaled |
dpi | Logical units/inch. If 0 defaults to 1440. |
int U_WMRINTERSECTCLIPRECT_get | ( | const char * | contents, |
U_RECT16 * | rect | ||
) |
Retrieve values from a U_WMRINTERSECTCLIPRECT record.
contents | record to extract data from |
rect | Clipping region is intersection of existing clipping region with rect. |
char* U_WMRINTERSECTCLIPRECT_set | ( | U_RECT16 | rect | ) |
Create and return a U_WMRINTERSECTCLIPRECT record.
rect | Clipping region is intersection of existing clipping region with rect. |
int U_WMRINVERTREGION_get | ( | const char * | contents, |
uint16_t * | Region | ||
) |
Get data from a U_WMRINVERTREGION record.
contents | record to extract data from |
Region | Index of region to invert. |
char* U_WMRINVERTREGION_set | ( | uint16_t | Region | ) |
Allocate and construct a U_WMRINVERTREGION record.
Region | Index of region to invert. |
int U_WMRLINETO_get | ( | const char * | contents, |
U_POINT16 * | coord | ||
) |
Retrieve values from a U_WMRLINETO record.
contents | record to extract data from |
coord | Draw line to {X,Y}. |
char* U_WMRLINETO_set | ( | U_POINT16 | coord | ) |
Create and return a U_WMRLINETO record.
coord | Draw line to {X,Y}. |
int U_WMRMOVETO_get | ( | const char * | contents, |
U_POINT16 * | coord | ||
) |
Retrieve values from a U_WMRMOVETO record.
contents | record to extract data from |
coord | Move to {X,Y}. |
char* U_WMRMOVETO_set | ( | U_POINT16 | coord | ) |
Create and return a U_WMRMOVETO record.
coord | Move to {X,Y}. |
int U_WMROFFSETCLIPRGN_get | ( | const char * | contents, |
U_POINT16 * | offset | ||
) |
Get data from a U_WMROFFSETCLIPRGN record.
contents | record to extract data from |
offset | pointer to a U_POINT16 variable where the x,y offsets will be stored. |
char* U_WMROFFSETCLIPRGN_set | ( | U_POINT16 | offset | ) |
Allocate and construct a U_WMROFFSETCLIPRGN record.
offset | U_POINT16 x,y offset to apply to the clipping region. |
int U_WMROFFSETVIEWPORTORG_get | ( | const char * | contents, |
U_POINT16 * | offset | ||
) |
Retrieve values from a U_WMROFFSETVIEWPORTORG record.
contents | record to extract data from |
offset | Viewport offset in device units. |
char* U_WMROFFSETVIEWPORTORG_set | ( | U_POINT16 | offset | ) |
Create and return a U_WMROFFSETVIEWPORTORG record.
offset | Viewport offset in device units. |
int U_WMROFFSETWINDOWORG_get | ( | const char * | contents, |
U_POINT16 * | offset | ||
) |
Retrieve values from a U_WMROFFSETWINDOWORG record.
contents | record to extract data from |
offset | Window offset in device units. |
char* U_WMROFFSETWINDOWORG_set | ( | U_POINT16 | offset | ) |
Create and return a U_WMROFFSETWINDOWORG record.
offset | Window offset in device units. |
int U_WMRPAINTREGION_get | ( | const char * | contents, |
uint16_t * | Region | ||
) |
Get data from a U_WMRPAINTREGION record.
contents | record to extract data from |
Region | Index of region to paint with the current Brush. |
char* U_WMRPAINTREGION_set | ( | uint16_t | Region | ) |
Allocate and construct a U_WMRPAINTREGION record.
Region | Index of region to paint with the current Brush. |
Get data from a U_WMRPATBLT record.
contents | record to extract data from |
Dst | Destination UL corner in logical units |
cwh | W & H for Dst and Src in logical units |
dwRop3 | RasterOPeration Enumeration |
Allocate and construct a U_WMRPATBLT record.
Dst | Destination UL corner in logical units |
cwh | W & H for Dst and Src in logical units |
dwRop3 | RasterOPeration Enumeration |
int U_WMRPOLYGON_get | ( | const char * | contents, |
uint16_t * | Length, | ||
const char ** | Data | ||
) |
Get data from a U_WMRPOLYGON record.
contents | record to extract data from |
Length | Number of points in the Polygon |
Data | pointer to array of U_POINT16 in memory. Pointer may not be aligned properly for structures. |
char* U_WMRPOLYGON_set | ( | uint16_t | Length, |
const U_POINT16 * | Data | ||
) |
Allocate and construct a U_WMRPOLYGON record.
Length | Number of points in the Polygon |
Data | Array of Length points |
int U_WMRPOLYLINE_get | ( | const char * | contents, |
uint16_t * | Length, | ||
const char ** | Data | ||
) |
Get data from a U_WMRPOLYLINE record.
contents | record to extract data from |
Length | Number of points in the Polyline |
Data | pointer to array of U_POINT16 in memory. Pointer may not be aligned properly for structures. |
char* U_WMRPOLYLINE_set | ( | uint16_t | Length, |
const U_POINT16 * | Data | ||
) |
Allocate and construct a U_WMRPOLYLINE record.
Length | Number of points in the Polyline |
Data | Array of Length points |
int U_WMRPOLYPOLYGON_get | ( | const char * | contents, |
uint16_t * | nPolys, | ||
const uint16_t ** | aPolyCounts, | ||
const char ** | Points | ||
) |
Get data from a U_WMR_POLYPOLYGON record.
contents | record to extract data from |
nPolys | Number of elements in aPolyCounts |
aPolyCounts | Number of points in each poly (sequential) |
Points | pointer to array of U_POINT16 in memory. Probably not aligned. |
char* U_WMRPOLYPOLYGON_set | ( | const uint16_t | nPolys, |
const uint16_t * | aPolyCounts, | ||
const U_POINT16 * | Points | ||
) |
Allocate and construct a U_WMR_POLYPOLYGON record.
nPolys | Number of elements in aPolyCounts |
aPolyCounts | Number of points in each poly (sequential) |
Points | array of points |
int U_WMRREALIZEPALETTE_get | ( | const char * | contents | ) |
Get data from a U_WMRREALIZEPALETTE record.
contents | record to extract data from |
char* U_WMRREALIZEPALETTE_set | ( | void | ) |
Allocate and construct a U_WMRREALIZEPALETTE record.
size_t U_WMRRECSAFE_get | ( | const char * | contents, |
const char * | blimit | ||
) |
Return the size of a WMF record, or 0 if it is found to be invalid. A valid record will have a size that does not cause it to extend beyond the end of data in memory. A valid record will not be smaller than the smallest possible WMF record.
contents | record to extract data from |
blimit | one byte past the last WMF record in memory. |
int U_WMRRECTANGLE_get | ( | const char * | contents, |
U_RECT16 * | rect | ||
) |
Retrieve values from a U_WMRRECTANGLE record.
contents | record to extract data from |
rect | Boundaries. |
char* U_WMRRECTANGLE_set | ( | U_RECT16 | rect | ) |
Create and return a U_WMRRECTANGLE record.
rect | Boundaries. |
int U_WMRRESIZEPALETTE_get | ( | const char * | contents, |
uint16_t * | Palette | ||
) |
Get data from a U_WMRRESIZEPALETTE record.
contents | record to extract data from |
Palette | Changes the size of the currently active Palette. |
char* U_WMRRESIZEPALETTE_set | ( | uint16_t | Palette | ) |
Allocate and construct a U_WMRRESIZEPALETTE record.
Palette | Changes the size of the currently active Palette. |
int U_WMRRESTOREDC_get | ( | const char * | contents, |
int16_t * | DC | ||
) |
Get data from a U_WMRRESTOREDC record.
contents | record to extract data from |
DC | DC to restore (relative if negative, absolute if positive) |
char* U_WMRRESTOREDC_set | ( | int16_t | DC | ) |
Allocate and construct a U_WMRRESTOREDC record.
DC | Drawing Context to restore. (negative is relative to current, positive is absolute) |
int U_WMRROUNDRECT_get | ( | const char * | contents, |
int16_t * | Width, | ||
int16_t * | Height, | ||
U_RECT16 * | rect | ||
) |
Retrieve values from a U_WMRROUNDRECT record.
contents | record to extract data from |
Width | Horizontal rounding length. |
Height | Vertical rounding length. |
rect | Boundaries. |
char* U_WMRROUNDRECT_set | ( | int16_t | Width, |
int16_t | Height, | ||
U_RECT16 | rect | ||
) |
Create and return a U_WMRROUNDRECT record.
Width | Horizontal rounding length. |
Height | Vertical rounding length. |
rect | Boundaries. |
int U_WMRSAVEDC_get | ( | const char * | contents | ) |
Get data from a U_WMRSAVEDC record.
contents | record to extract data from |
char* U_WMRSAVEDC_set | ( | void | ) |
Allocate and construct a U_WMRSAVEDC record.
Retrieve values from a U_WMRSCALEVIEWPORTEXT record.
contents | record to extract data from |
Denom | {X,Y} denominators. |
Num | {X,Y} numerators. |
Create and return a U_WMRSCALEVIEWPORTEXT record.
Denom | {X,Y} denominators. |
Num | {X,Y} numerators. |
Retrieve values from a U_WMRSCALEWINDOWEXT record.
contents | record to extract data from |
Denom | {X,Y} denominators. |
Num | {X,Y} numerators. |
Create and return a U_WMRSCALEWINDOWEXT record.
Denom | {X,Y} denominators. |
Num | {X,Y} numerators. |
int U_WMRSELECTCLIPREGION_get | ( | const char * | contents, |
uint16_t * | Region | ||
) |
Get data from a U_WMRSELECTCLIPREGION record.
contents | record to extract data from |
Region | Index of region to become clipping region.. |
char* U_WMRSELECTCLIPREGION_set | ( | uint16_t | Region | ) |
Allocate and construct a U_WMRSELECTCLIPREGION record.
Region | Index of region to become clipping region.. |
int U_WMRSELECTOBJECT_get | ( | const char * | contents, |
uint16_t * | Object | ||
) |
Get data from a U_WMRSELECTOBJECT record.
contents | record to extract data from |
Object | Index of object which is made active. |
char* U_WMRSELECTOBJECT_set | ( | uint16_t | object | ) |
Allocate and construct a U_WMRSELECTOBJECT record.
object | Index of object which is made active. |
int U_WMRSELECTPALETTE_get | ( | const char * | contents, |
uint16_t * | Palette | ||
) |
Get data from a U_WMRSELECTPALETTE record.
contents | record to extract data from |
Palette | Index of Palette to make active. |
char* U_WMRSELECTPALETTE_set | ( | uint16_t | Palette | ) |
Allocate and construct a U_WMRSELECTPALETTE record.
Palette | Index of Palette to make active. |
int U_WMRSETBKCOLOR_get | ( | const char * | contents, |
U_COLORREF * | Color | ||
) |
Retrieve values from a U_WMRSETBKCOLOR record.
contents | record to extract data from |
Color | Background Color. |
char* U_WMRSETBKCOLOR_set | ( | U_COLORREF | Color | ) |
Create and return a U_WMRSETBKCOLOR record.
Color | Background Color. |
int U_WMRSETBKMODE_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Retrieve values from a U_WMRSETBKMODE record.
contents | record to extract data from |
Mode | MixMode Enumeration |
char* U_WMRSETBKMODE_set | ( | uint16_t | Mode | ) |
Create and return a U_WMRSETBKMODE record.
Mode | MixMode Enumeration |
int U_WMRSETDIBTODEV_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
U_POINT16 * | cwh, | ||
U_POINT16 * | Src, | ||
uint16_t * | cUsage, | ||
uint16_t * | ScanCount, | ||
uint16_t * | StartScan, | ||
const char ** | dib | ||
) |
Get data from a U_WMRSETDIBTODEV record.
contents | record to extract data from |
Dst | UL corner of Dst rect in logical units |
cwh | Width and Height in logical units |
Src | UL corner of Src rect in logical units |
cUsage | ColorUsage enumeration |
ScanCount | Number of scan lines in Src |
StartScan | First Scan line in Src |
dib | DeviceIndependentBitmap object |
char* U_WMRSETDIBTODEV_set | ( | void | ) |
Allocate and construct a U_WMRSETDIBTODEV record.
int U_WMRSETMAPMODE_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Retrieve values from a U_WMRSETMAPMODE record.
contents | record to extract data from |
Mode | MapMode Enumeration |
char* U_WMRSETMAPMODE_set | ( | uint16_t | Mode | ) |
Create and return a U_WMRSETMAPMODE record.
Mode | MapMode Enumeration |
int U_WMRSETMAPPERFLAGS_get | ( | const char * | contents, |
uint32_t * | Mode | ||
) |
Get data from a U_WMRSETMAPPERFLAGS record.
contents | record to extract data from |
Mode | If 1 bit set font mapper selects only matching aspect fonts. |
char* U_WMRSETMAPPERFLAGS_set | ( | uint32_t | Mode | ) |
Allocate and construct a U_WMRSETMAPPERFLAGS record.
Mode | If 1 bit set font mapper selects only matching aspect fonts. |
int U_WMRSETPALENTRIES_get | ( | const char * | contents, |
U_PALETTE * | Palette, | ||
const char ** | PalEntries | ||
) |
Get data from a U_WMRSETPALENTRIES record.
contents | record to extract data from |
Palette | Defines a set of RGB values for the current active Palette. |
PalEntries | Array of Palette Entries |
char* U_WMRSETPALENTRIES_set | ( | const U_PALETTE * | Palette | ) |
Allocate and construct a U_WMRSETPALENTRIES record.
Palette | Defines a set of RGB values for the current active Palette. |
int U_WMRSETPIXEL_get | ( | const char * | contents, |
U_COLORREF * | Color, | ||
U_POINT16 * | Coord | ||
) |
Get data from a U_WMRSETPIXEL record.
contents | record to extract data from |
Color | pointer to a U_COLORREF variable where the color will be stored. |
Coord | pointer to a U_POINT16 variable where the coordinates will be stored. |
char* U_WMRSETPIXEL_set | ( | U_COLORREF | Color, |
U_POINT16 | Coord | ||
) |
Allocate and construct a U_WMRSETPIXEL record.
Color | U_COLORREF color of the pixel |
Coord | U_POINT16 coordinates of the pixel |
int U_WMRSETPOLYFILLMODE_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Retrieve values from a U_WMRSETPOLYFILLMODE record.
contents | record to extract data from |
Mode | PolyFillMode Enumeration |
char* U_WMRSETPOLYFILLMODE_set | ( | uint16_t | Mode | ) |
Create and return a U_WMRSETPOLYFILLMODE record.
Mode | PolyFillMode Enumeration |
int U_WMRSETRELABS_get | ( | const char * | contents | ) |
Get data from a U_WMRSETRELABS record.
contents | record to extract data from |
char* U_WMRSETRELABS_set | ( | void | ) |
Allocate and construct a U_WMRSETRELABS record.
int U_WMRSETROP2_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Retrieve values from a U_WMRSETROP2 record.
contents | record to extract data from |
Mode | Binary Raster Operation Enumeration |
char* U_WMRSETROP2_set | ( | uint16_t | Mode | ) |
Create and return a U_WMRSETROP2 record.
Mode | Binary Raster Operation Enumeration |
int U_WMRSETSTRETCHBLTMODE_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Retrieve values from a U_WMRSETSTRETCHBLTMODE record.
contents | record to extract data from |
Mode | StretchMode Enumeration |
char* U_WMRSETSTRETCHBLTMODE_set | ( | uint16_t | Mode | ) |
Create and return a U_WMRSETSTRETCHBLTMODE record.
Mode | StretchMode Enumeration |
int U_WMRSETTEXTALIGN_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Get data from a U_WMRSETTEXTALIGN record.
contents | record to extract data from |
Mode | TextAlignment Enumeration. |
char* U_WMRSETTEXTALIGN_set | ( | uint16_t | Mode | ) |
Allocate and construct a U_WMRSETTEXTALIGN record.
Mode | TextAlignment Enumeration. |
int U_WMRSETTEXTCHAREXTRA_get | ( | const char * | contents, |
uint16_t * | Mode | ||
) |
Retrieve values from a U_WMRSETTEXTCHAREXTRA record.
contents | record to extract data from |
Mode | Extra space in logical units to add to each character |
char* U_WMRSETTEXTCHAREXTRA_set | ( | uint16_t | Mode | ) |
Create and return a U_WMRSETTEXTCHAREXTRA record.
Mode | Extra space in logical units to add to each character |
int U_WMRSETTEXTCOLOR_get | ( | const char * | contents, |
U_COLORREF * | Color | ||
) |
Retrieve values from a U_WMRSETTEXTCOLOR record.
contents | record to extract data from |
Color | Text Color. |
char* U_WMRSETTEXTCOLOR_set | ( | U_COLORREF | Color | ) |
Create and return a U_WMRSETTEXTCOLOR record.
Color | Text Color. |
int U_WMRSETTEXTJUSTIFICATION_get | ( | const char * | contents, |
uint16_t * | Count, | ||
uint16_t * | Extra | ||
) |
Retrieve values from a U_WMRSETTEXTJUSTIFICATION record.
contents | record to extract data from |
Count | Number of space characters in the line. |
Extra | Number of extra space characters to add to the line. |
char* U_WMRSETTEXTJUSTIFICATION_set | ( | uint16_t | Count, |
uint16_t | Extra | ||
) |
Create and return a U_WMRSETTEXTJUSTIFICATION record.
Count | Number of space characters in the line. |
Extra | Number of extra space characters to add to the line. |
int U_WMRSETVIEWPORTEXT_get | ( | const char * | contents, |
U_POINT16 * | extent | ||
) |
Retrieve values from a U_WMRSETVIEWPORTEXT record.
contents | record to extract data from |
extent | Viewport Extent. |
char* U_WMRSETVIEWPORTEXT_set | ( | U_POINT16 | extent | ) |
Create and return a U_WMRSETVIEWPORTEXT record.
extent | Viewport Extent. |
int U_WMRSETVIEWPORTORG_get | ( | const char * | contents, |
U_POINT16 * | coord | ||
) |
Retrieve values from a U_WMRSETVIEWPORTORG record.
contents | record to extract data from |
coord | Viewport Origin. |
char* U_WMRSETVIEWPORTORG_set | ( | U_POINT16 | coord | ) |
Create and return a U_WMRSETVIEWPORTORG record.
coord | Viewport Origin. |
int U_WMRSETWINDOWEXT_get | ( | const char * | contents, |
U_POINT16 * | extent | ||
) |
Retrieve values from a U_WMRSETWINDOWEXT record.
contents | record to extract data from |
extent | Window Extent. |
char* U_WMRSETWINDOWEXT_set | ( | U_POINT16 | extent | ) |
Create and return a U_WMRSETWINDOWEXT record.
extent | Window Extent. |
int U_WMRSETWINDOWORG_get | ( | const char * | contents, |
U_POINT16 * | coord | ||
) |
Retrieve values from a U_WMRSETWINDOWORG record.
contents | record to extract data from |
coord | Window Origin. |
char* U_WMRSETWINDOWORG_set | ( | U_POINT16 | coord | ) |
Create and return a U_WMRSETWINDOWORG record.
coord | Window Origin. |
int U_WMRSTRETCHBLT_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
U_POINT16 * | cDst, | ||
U_POINT16 * | Src, | ||
U_POINT16 * | cSrc, | ||
uint32_t * | dwRop3, | ||
U_BITMAP16 * | Bm16, | ||
const char ** | px | ||
) |
Get data from a U_WMRSTRETCHBLT record.
contents | record to extract data from |
Dst | Destination UL corner in logical units |
cDst | Destination W & H in logical units |
Src | Source UL corner in logical units |
cSrc | Source W & H in logical units |
dwRop3 | RasterOPeration Enumeration |
Bm16 | bitmap16 object (fields in it are all 0 if no bitmap is used) |
px | pointer to bitmap in memory, or NULL if not used |
char* U_WMRSTRETCHBLT_set | ( | U_POINT16 | Dst, |
U_POINT16 | cDst, | ||
U_POINT16 | Src, | ||
U_POINT16 | cSrc, | ||
uint32_t | dwRop3, | ||
const U_BITMAP16 * | Bm16 | ||
) |
Allocate and construct a U_WMRSTRETCHBLT record.
Dst | Destination UL corner in logical units |
cDst | Destination W & H in logical units |
Src | Source UL corner in logical units |
cSrc | Source W & H in logical units |
dwRop3 | RasterOPeration Enumeration |
Bm16 | (Optional) bitmap16 object |
int U_WMRSTRETCHDIB_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
U_POINT16 * | cDst, | ||
U_POINT16 * | Src, | ||
U_POINT16 * | cSrc, | ||
uint16_t * | cUsage, | ||
uint32_t * | dwRop3, | ||
const char ** | dib | ||
) |
Get data from a U_WMRSTRETCHDIB record.
contents | record to extract data from |
Dst | Destination UL corner in logical units |
cDst | Destination W & H in logical units |
Src | Source UL corner in logical units |
cSrc | Source W & H in logical units |
cUsage | DIBColors Enumeration |
dwRop3 | RasterOPeration Enumeration |
dib | (Optional) device independent bitmap |
char* U_WMRSTRETCHDIB_set | ( | U_POINT16 | Dst, |
U_POINT16 | cDst, | ||
U_POINT16 | Src, | ||
U_POINT16 | cSrc, | ||
uint16_t | cUsage, | ||
uint32_t | dwRop3, | ||
const U_BITMAPINFO * | Bmi, | ||
uint32_t | cbPx, | ||
const char * | Px | ||
) |
Allocate and construct a U_WMRSTRETCHDIB record.
Dst | Destination UL corner in logical units |
cDst | Destination W & H in logical units |
Src | Source UL corner in logical units |
cSrc | Source W & H in logical units |
cUsage | DIBColors Enumeration |
dwRop3 | RasterOPeration Enumeration |
Bmi | (Optional) bitmapbuffer (U_BITMAPINFO section) |
cbPx | Size in bytes of pixel array (row STRIDE * height, there may be some padding at the end of each row) |
Px | (Optional) bitmapbuffer (pixel array section ) |
int U_WMRTEXTOUT_get | ( | const char * | contents, |
U_POINT16 * | Dst, | ||
int16_t * | Length, | ||
const char ** | string | ||
) |
Get data from a U_WMRTEXTOUT record.
contents | record to extract data from |
Dst | coordinates where text will be written |
Length | Number of characters in string. |
string | Pointer to string in WMF buffer in memory. This text is generally NOT null terminated!!! |
char* U_WMRTEXTOUT_set | ( | U_POINT16 | Dst, |
char * | string | ||
) |
Allocate and construct a U_WMRTEXTOUT record.
Dst | Destinationin logical units |
string | Null terminated string to write. The terminator is NOT placed in the record! |
char* wbegin_path_set | ( | void | ) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly.
char* wcreatebrushindirect_set | ( | uint32_t * | ihBrush, |
WMFHANDLES * | wht, | ||
U_WLOGBRUSH | lb | ||
) |
Allocate and construct a U_WMRCREATEBRUSHINDIRECT record, create a handle and returns it Use this function instead of calling U_WMRCREATEBRUSHINDIRECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihBrush | handle to be used by new object |
wht | WMF handle table |
lb | Brush parameters |
char* wcreatedibpatternbrush_srcbm16_set | ( | uint32_t * | ihBrush, |
WMFHANDLES * | wht, | ||
const uint32_t | iUsage, | ||
const U_BITMAP16 * | Bm16 | ||
) |
Allocate and construct a U_WMRCREATEPATTERNBRUSH record from a U_BITMAP16 object. Use this function instead of calling U_WMRCREATEPATTERNBRUSH_set() directly.
ihBrush | handle to be used by new object |
wht | WMF handle table |
iUsage | DIBColors enumeration |
Bm16 | Pointer to a Bitmap16 object |
char* wcreatedibpatternbrush_srcdib_set | ( | uint32_t * | ihBrush, |
WMFHANDLES * | wht, | ||
const uint32_t | iUsage, | ||
const U_BITMAPINFO * | Bmi, | ||
const uint32_t | cbPx, | ||
const char * | Px | ||
) |
Allocate and construct a U_WMRDIBCREATEPATTERNBRUSH record from a DIB. Use this function instead of calling U_WMRDIBCREATEPATTERNBRUSH_set() directly.
ihBrush | handle to be used by new object |
wht | WMF handle table |
iUsage | DIBColors enumeration |
Bmi | Bitmap info |
cbPx | Size in bytes of pixel array (row stride * height, there may be some padding at the end of each row) |
Px | (Optional) bitmapbuffer (pixel array section ) |
char* wcreatefontindirect_set | ( | uint32_t * | ihFont, |
WMFHANDLES * | wht, | ||
U_FONT * | uf | ||
) |
Allocate and construct a U_WMRCREATEFONTINDIRECT record, create a handle and returns it Use this function instead of calling U_WMRCREATEFONTINDIRECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihFont | Font handle, will be created and returned |
wht | Pointer to structure holding all WMF handles |
uf | Pointer to Font parameters as U_FONT * |
char* wcreatepalette_set | ( | uint32_t * | ihPal, |
WMFHANDLES * | wht, | ||
U_PALETTE * | up | ||
) |
Allocate and construct a U_WMRCREATEPALETTE record, create a handle and returns it Use this function instead of calling U_WMRCREATEPALETTE_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihPal | Palette handle, will be created and returned |
wht | Pointer to structure holding all WMF handles |
up | Palette parameters |
char* wcreatepatternbrush_set | ( | uint32_t * | ihBrush, |
WMFHANDLES * | wht, | ||
U_BITMAP16 * | Bm16, | ||
char * | Pattern | ||
) |
Allocate and construct a U_WMRCREATEPATTERNBRUSH record, create a handle and returns it Use this function instead of calling U_WMRCREATEPATTERNBRUSH_set() directly. Warning - application support for U_WMRCREATEPATTERNBRUSH is spotty, better to use U_WMRDIBCREATEPATTERNBRUSH.
ihBrush | handle to be used by new object |
wht | WMF handle table |
Bm16 | Pointer to a Bitmap16 structure (only first 10 bytes are used). |
Pattern | Pointer to a byte array described by Bm16. (Pattern may be a pointer to the BM16 Bits field.) |
char* wcreatepenindirect_set | ( | uint32_t * | ihPen, |
WMFHANDLES * | wht, | ||
U_PEN | pen | ||
) |
Allocate and construct a U_WMRCREATEPENINDIRECT record, create a handle and returns it Use this function instead of calling U_WMRCREATEPENINDIRECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihPen | handle to be used by new object |
wht | WMF handle table |
pen | Pen parameters (U_PEN) |
char* wcreateregion_set | ( | uint32_t * | ihReg, |
WMFHANDLES * | wht, | ||
const U_REGION * | Region | ||
) |
Allocate and construct a U_WMRCREATEREGION record, create a handle and returns it Use this function instead of calling U_WMRCREATEREGION() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihReg | Region handle, will be created and returned |
wht | Pointer to structure holding all WMF handles |
Region | Values to set with |
char* wdeleteobject_set | ( | uint32_t * | ihObject, |
WMFHANDLES * | wht | ||
) |
Allocate and construct a U_WMRDELETEOBJECT record and also delete the requested object from the table. Use this function instead of calling U_WMRDELETEOBJECT_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihObject | Pointer to handle to delete. This value is set to 0xFFFFFFFF if the function succeeds. |
wht | WMF handle table |
Note that calling this function should always be conditional on the specifed object being defined. It is easy to write a program where deleteobject_set() is called in a sequence where, at the time, we know that ihObject is defined. Then a later modification, possibly quite far away in the code, causes it to be undefined. That distant change will result in a failure when this function reutrns. That problem cannot be handled here because the only values which may be returned are a valid U_WMRDELETEOBJECT record or a NULL, and other errors could result in the NULL. So the object must be checked before the call.
char* wend_path_set | ( | void | ) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly.
int wget_DIB_params | ( | const char * | dib, |
const char ** | px, | ||
const U_RGBQUAD ** | ct, | ||
int32_t * | numCt, | ||
int32_t * | width, | ||
int32_t * | height, | ||
int32_t * | colortype, | ||
int32_t * | invert | ||
) |
Assume a packed DIB and get the parameters from it, use by DBI_to_RGBA()
dib | pointer to the start of the DIB in the record |
px | pointer to DIB pixel array |
ct | pointer to DIB color table |
numCt | DIB color table number of entries, for PNG or JPG returns the number of bytes in the image |
width | Width of pixel array |
height | Height of pixel array (always returned as a positive number) |
colortype | DIB BitCount Enumeration |
invert | If DIB rows are in opposite order from RGBA rows |
char* wlinecap_set | ( | int32_t | Type | ) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly.
Type | PostScriptCap Enumeration, anything else is an error |
char* wlinejoin_set | ( | int32_t | Type | ) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly.
Type | PostScriptCap Enumeration, anything else is an error |
int wmf_append | ( | U_METARECORD * | rec, |
WMFTRACK * | wt, | ||
int | freerec | ||
) |
Append an WMF record to a wmf in memory. This may reallocate buf memory.
rec | Record to append to WMF in memory |
wt | WMF in memory |
freerec | If true, free rec after append |
int wmf_finish | ( | WMFTRACK * | wt | ) |
Finalize the emf in memory and write it to the file.
wt | WMF in memory |
int wmf_free | ( | WMFTRACK ** | wt | ) |
Release memory for an wmf structure in memory. Call this after wmf_finish().
wt | WMF in memory |
int wmf_header_append | ( | U_METARECORD * | rec, |
WMFTRACK * | wt, | ||
int | freerec | ||
) |
Append an WMF header to a wmf in memory. This may reallocate buf memory. WMF header is not a normal record, method used to figure out its size is different.
rec | header to append to WMF in memory |
wt | WMF in memory |
freerec | If true, free rec after append |
int wmf_htable_create | ( | uint32_t | initsize, |
uint32_t | chunksize, | ||
WMFHANDLES ** | wht | ||
) |
Create a handle table. Entries filled with 0 are empty, entries >0 hold a handle.
initsize | Initialize with space for this number of handles |
chunksize | When needed increase space by this number of handles |
wht | WMF handle table |
int wmf_htable_delete | ( | uint32_t * | ih, |
WMFHANDLES * | wht | ||
) |
Delete an entry from the handle table. Move it back onto the stack. The specified slot is filled with a 0.
ih | handle |
wht | WMF handle table |
int wmf_htable_free | ( | WMFHANDLES ** | wht | ) |
Free all memory in an htable. Sets the pointer to NULL.
wht | WMF handle table |
int wmf_htable_insert | ( | uint32_t * | ih, |
WMFHANDLES * | wht | ||
) |
Returns the index of the first free slot. Call realloc() if needed. The slot is set to handle (indicates occupied) and the peak value is adjusted.
ih | handle |
wht | WMF handle table |
int wmf_readdata | ( | const char * | filename, |
char ** | contents, | ||
size_t * | length | ||
) |
Retrieve contents of an WMF file by name.
filename | Name of file to open, including the path |
contents | Contents of the file. Buffer must be free()'d by caller. |
length | Number of bytes in Contents |
int wmf_start | ( | const char * | name, |
const uint32_t | initsize, | ||
const uint32_t | chunksize, | ||
WMFTRACK ** | wt | ||
) |
Start constructing an wmf in memory. Supply the file name and initial size.
name | WMF filename (will be opened) |
initsize | Initialize WMF in memory to hold this many bytes |
chunksize | When needed increase WMF in memory by this number of bytes |
wt | WMF in memory |
int wmfheader_get | ( | const char * | contents, |
const char * | blimit, | ||
U_WMRPLACEABLE * | Placeable, | ||
U_WMRHEADER * | Header | ||
) |
Get data from a (placeable) WMR_HEADER.
contents | record to extract data from |
blimit | one byte past the last WMF record in memory. |
Placeable | U_WMRPLACEABLE data, if any |
Header | U_WMRHEADER data, if any |
char* wmiterlimit_set | ( | int32_t | limit | ) |
Allocate and construct the specified U_WMRESCAPE structure, create a handle and returns it Use this function instead of calling U_WMRESCAPE_set() directly.
limit | PostScriptCap Enumeration, anything else is an error |
int wmr_arc_points | ( | U_RECT16 | rclBox16, |
U_POINT16 | ArcStart16, | ||
U_POINT16 | ArcEnd16, | ||
int * | f1, | ||
int | f2, | ||
U_PAIRF * | center, | ||
U_PAIRF * | start, | ||
U_PAIRF * | end, | ||
U_PAIRF * | size | ||
) |
Derive from bounding box and start and end arc, for WMF arc, chord, or pie records, the center, start, and end points, and the bounding rectangle.
rclBox16 | Bounding box of Arc |
ArcStart16 | Coordinates for Start of Arc |
ArcEnd16 | Coordinates for End of Arc |
f1 | 1 if rotation angle >= 180, else 0 |
f2 | Rotation direction, 1 if counter clockwise, else 0 |
center | Center coordinates |
start | Start coordinates (point on the ellipse defined by rect) |
end | End coordinates (point on the ellipse defined by rect) |
size | W,H of the x,y axes of the bounding rectangle. |
char* wmr_dup | ( | const char * | wmr | ) |
Duplicate an WMR record.
wmr | record to duplicate |
char* wselectobject_set | ( | uint32_t | ihObject, |
WMFHANDLES * | wht | ||
) |
Allocate and construct a U_WMRSELECTOBJECT record, checks that the handle specified is one that can actually be selected. Use this function instead of calling U_WMRSELECTOBJECT_set() directly. Object Pointer in WMF (caller) is 0->N, so is record, so no correction to 1->N+1 needed here.
ihObject | handle to select |
wht | WMF handle table |
char* wsetpaletteentries_set | ( | uint32_t * | ihPal, |
WMFHANDLES * | wht, | ||
const U_PALETTE * | Palettes | ||
) |
Allocate and construct a U_WMRSETPALENTRIES record, create a handle and returns it Use this function instead of calling U_WMRSETPALENTRIES_set() directly. Object Pointer in WMF (caller) is 0->N, but in htable it is 1->N+1, make that correction here.
ihPal | Palette handle, will be created and returned |
wht | Pointer to structure holding all WMF handles |
Palettes | Values to set with |