home *** CD-ROM | disk | FTP | other *** search
- /*
- * $Log: wmf.h,v $
- * Revision 1.7 1994/06/26 18:03:53 JFusco
- * Fixed RGB_color_t type. My documentation appears to be in error.
- *
- * Revision 1.6 1994/06/25 02:28:03 JFusco
- * Better fills (?). Tries to match luminance of color values.
- *
- * Revision 1.5 1994/06/18 03:11:10 JFusco
- * Added enumerated types and more objects. Deleted the global variable
- * declaration here and moved it into wmf.c where it belonged anyway.
- *
- * Revision 1.4 94/06/16 23:30:38 JFusco
- * Most structures are now types, added some new ones.
- *
- * Revision 1.3 94/06/13 22:14:49 JFusco
- * Added more structures and corrected spelling.
- *
- * Revision 1.2 94/06/13 07:47:59 JFusco
- * Added a function lookup table and removed test function prototypes.
- *
- * Revision 1.1 94/06/12 23:04:50 JFusco
- * Initial revision
- *
- */
-
- #ifndef WMF_WMF_INC
- #define WMF_WMF_INC 1
- typedef unsigned short USHORT;
- typedef unsigned char UBYTE;
- typedef unsigned long ULONG;
-
- #define WMF_Null 0
- #define WMF_AnimatePalette 0x436
- #define WMF_Arc 0x817
- #define WMF_BitBlt 0x922
- #define WMF_BitBlt3 0x940
- #define WMF_Chord 0x830
- #define WMF_CreateBrushIndirect 0x2fc
- #define WMF_CreateFontIndirect 0x2fb
- #define WMF_CreatePalette 0xf7
- #define WMF_CreatePatternBrush 0x1f9
- #define WMF_CreatePatternBrush3 0x142
- #define WMF_CreatePenIndirect 0x2fa
- #define WMF_CreateRegion 0x6ff
- #define WMF_DeleteObject 0x1f0
- #define WMF_DrawText 0x62f
- #define WMF_Ellipse 0x418
- #define WMF_Escape 0x626
- #define WMF_ExcludeClipRect 0x415
- #define WMF_ExtTextOut 0xa32
- #define WMF_FloodFill 0x419
- #define WMF_InsertClipRect 0x416
- #define WMF_LineTo 0x213
- #define WMF_MoveTo 0x214
- #define WMF_OffsetClipRgn 0x220
- #define WMF_OffsetViewportOrg 0x211
- #define WMF_OffsetWindowOrg 0x20f
- #define WMF_PatBlt 0x61d
- #define WMF_Pie 0x81a
- #define WMF_Polygon 0x324
- #define WMF_Polyline 0x325
- #define WMF_PolyPolygon 0x538
- #define WMF_RealizePalette 0x35
- #define WMF_Rectangle 0x41b
- #define WMF_ResizePalette 0x139
- #define WMF_RestoreDC 0x127
- #define WMF_RoundRect 0x61c
- #define WMF_SaveDC 0x01e
- #define WMF_ScaleViewportExt 0x412
- #define WMF_ScaleWindowExt 0x400
- #define WMF_SelectClipRgn 0x12c
- #define WMF_SelectObject 0x12d
- #define WMF_SelectPalette 0x234
- #define WMF_SetBkColor 0x201
- #define WMF_SetBkMode 0x102
- #define WMF_SetDIBitsToDevice 0xd33
- #define WMF_SetMapMode 0x103
- #define WMF_SetMapperFlags 0x231
- #define WMF_SetPaletteEntries 0x037
- #define WMF_SetPixel 0x41f
- #define WMF_SetPolyFillMode 0x106
- #define WMF_SetROP2 0x104
- #define WMF_SetStretchBltMode 0x107
- #define WMF_SetTextAlign 0x12e
- #define WMF_SetTextCharExtra 0x108
- #define WMF_SetTextColor 0x209
- #define WMF_SetTextJustification 0x20a
- #define WMF_SetViewportExt 0x20e
- #define WMF_SetViewportOrg 0x20d
- #define WMF_SetWindowExt 0x20c
- #define WMF_SetWindowOrg 0x20b
- #define WMF_StretchBlt 0xb23
- #define WMF_StretchBlt3 0xb41
- #define WMF_StretchDIBits 0xf43
- #define WMF_TextOut 0x521
-
- typedef struct yx_pair {
- short Y, X;
- } yx_pair_t;
-
- struct xy_pair {
- short X, Y;
- };
-
- typedef struct RGB_color_ {
- UBYTE Type, Blue, Green, Red;
- } RGB_color_t;
-
- typedef struct Indexed_color_ {
- UBYTE Type, garbage;
- USHORT Index;
- } Indexed_color_t;
-
- typedef union wmf_color_ {
- RGB_color_t RGB;
- Indexed_color_t IDX;
- } wmf_color_t;
-
- typedef struct wmf_hdr {
- USHORT Type,
- Hsize,
- Ver;
- ULONG Fsize;
- USHORT numHandles;
- ULONG Largest;
- USHORT Notused;
- } wmf_hdr_t;
-
- typedef struct wmf_place_hdr {
- ULONG ID;
- short unused0, Left, Top, Right, Bottom;
- USHORT pixelsPerInch;
- ULONG unused1;
- USHORT Checksum;
- } wmf_place_hdr_t;
-
- struct rec_tmpl {
- ULONG Size;
- USHORT Func;
- short Data[1];
- };
-
- typedef struct poly_point_tmpl_ {
- USHORT numPoints;
- struct xy_pair Point[1];
- } poly_point_tmpl_t;
-
- /* WMF Object Type definitions. */
-
- typedef struct pen_ {
- USHORT Style, Width, unused;
- wmf_color_t Color;
- } pen_t;
-
- typedef struct brush_ {
- USHORT Style;
- wmf_color_t Color;
- USHORT HatchType;
- } brush_t;
-
- typedef struct font_ {
- USHORT Height, Width,
- Escapement, Orientation, Weight;
- UBYTE Italic, Underline, Strikeout,
- CharacterSet, OutputPrecision, ClippingPrecision,
- OutputQuality, PitchAndType, Name[32];
- } font_t;
-
- typedef struct palette_ {
- USHORT Version, NumEntries;
- ULONG *ColorReg;
- } palette_t;
-
- typedef struct pattern_brush_ {
- USHORT BitsWide, BitsHigh, /* Bitmap is in an even number of bytes. */
- BytesWide, BytesHigh, /* Always even. */
- NumPlanes,
- PixelBitsPerPlane, /* Always 1 ? */
- unusedPointer; /* Bitmap data follows!!! */
- UBYTE *Bitmap;
- } pattern_brush_t;
-
- typedef struct pattern_brush3_ {
- USHORT Type, Usage,
- *BitMapInfo; /* Lazzzzzzzzzzzzzzzzzy. */
- } pattern_brush3_t;
-
- typedef enum wmf_objects_ {
- NOTANOBJ, BRUSH, FONT, PALETTE, PATTERNBRUSH, PATTERNBRUSH3, PEN
- } wmf_objects;
-
- typedef struct wmf_handle_ {
- USHORT *Data;
- wmf_objects Type;
- } wmf_handle_t;
-
- #endif /* WMF_WMF_INC */
-