


Window Metafile (wmf) Reference



METAFILE OPERAND 

SUPPORTED






X version


gd (gif) version




#define 
SetBkColor.htmlMETA_SETBKCOLOR               0x0201
X 
X 


#define 
SetBkMode.htmlMETA_SETBKMODE                0x0102 
X 
X 


#define 
SetMapMode.htmlMETA_SETMAPMODE               0x0103 
X 
X 


#define 
SetROP2.htmlMETA_SETROP2                  0x0104 
X 
- 


#define 
SetPolyFillMode.htmlMETA_SETPOLYFILLMODE          0x0106 
X #44 
- 


#define 
SetStretchBltMode.htmlMETA_SETSTRETCHBLTMODE        0x0107 
- #33 
- #33 


#define 
SetTextColor.htmlMETA_SETTEXTCOLOR             0x0209 
X 
X 



#define 
SetTextCharacterExtra.htmlMETA_SETTEXTCHAREXTRA         0x0108 
X #44 
- 


#define 
SetWindowOrg.htmlMETA_SETWINDOWORG             0x020B 
X 
X 


#define 
SetWindowExt.htmlMETA_SETWINDOWEXT             0x020C 
X 
X 


#define 
SetViewportOrg.htmlMETA_SETVIEWPORTORG           0x020D 
X #44 
X #44 


#define 
SetViewportExt.htmlMETA_SETVIEWPORTEXT           0x020E 
X #44 
X #44 


#define 
OffsetWindowOrg.htmlMETA_OFFSETWINDOWORG          0x020F 
X #44 
X #44 


#define 
ScaleWindowExt.htmlMETA_SCALEWINDOWEXT           0x0410 
X #44 
X #44 


#define 
OffsetViewportOrg.htmlMETA_OFFSETVIEWPORTORG        0x0211 
X #44 
X #44 


#define 
ScaleViewportExt.htmlMETA_SCALEVIEWPORTEXT         0x0412 
X #44 
X #44 


#define 
LineTo.htmlMETA_LINETO                   0x0213 
X 
X 


#define 
MoveTo.htmlMETA_MOVETO                   0x0214 
X 
X 


#define 
ExcludeClipRect.htmlMETA_EXCLUDECLIPRECT          0x0415 
X 
- 


#define 
IntersectClipRect.htmlMETA_INTERSECTCLIPRECT        0x0416 
X 
- 


#define 
Arc.htmlMETA_ARC                      0x0817 
X 
X 


#define 
Ellipse.htmlMETA_ELLIPSE                  0x0418 
X 
X 


#define 
FloodFill.htmlMETA_FLOODFILL                0x0419 
X #44 
X #44 


#define 
Pie.htmlMETA_PIE                      0x081A 
X 
X 


#define 
Rectangle.htmlMETA_RECTANGLE                0x041B 
X 
X 


#define 
RoundRect.htmlMETA_ROUNDRECT                0x061C 
X 
X 


#define 
PatBlt.htmlMETA_PATBLT                   0x061D 
X #44 #66 
X #44 #66 


#define 
SaveDC.htmlMETA_SAVEDC                   0x001E 
X 
X 


#define 
SetPixel.htmlMETA_SETPIXEL                 0x041F 
X 
X 


#define 
OffsetClipRgn.htmlMETA_OFFSETCLIPRGN            0x0220 
X 
- 


#define 
Polygon.htmlMETA_POLYGON                  0x0324 
X 
X 


#define 
Polyline.htmlMETA_POLYLINE                 0x0325 
X 
X 


#define 
esc.htmlMETA_ESCAPE                   0x0626 
- #55 
- #55 


#define 
RestoreDC.htmlMETA_RESTOREDC                0x0127 
X 
X 


#define 
FillRgn.htmlMETA_FILLREGION               0x0228 
X 
X 


#define 
FrameRgn.htmlMETA_FRAMEREGION              0x0429 
X 
- 


#define 
InvertRgn.htmlMETA_INVERTREGION             0x012A 
X #44 
- 


#define 
PaintRgn.htmlMETA_PAINTREGION              0x012B 
X #44 
X 


#define 
SelectClipRgn.htmlMETA_SELECTCLIPREGION         0x012C 
X #44 
- 


#define 
SelectObject.htmlMETA_SELECTOBJECT             0x012D 
X 
X 


#define 
SetTextAlign.htmlMETA_SETTEXTALIGN             0x012E 
X 
_ 


#define 
Chord.htmlMETA_CHORD                    0x0830 
X 
X 


#define 
SetMapperFlags.htmlMETA_SETMAPPERFLAGS           0x0231 
- #33 
- #33 



#define 
TextOut.htmlMETA_TEXTOUT                  0x0521 


#define 
ExtTextOut.htmlMETA_EXTTEXTOUT               0x0a32 
X 



#define 
SetDIBitsToDevice.htmlMETA_SETDIBTODEV              0x0d33 
X #44 
X #44 


#define 
PolyPolygon.htmlMETA_POLYPOLYGON              0x0538 
X 
X 


#define 
DibBitBlt.htmlMETA_DIBBITBLT                0x0940 
X #77 
- 


#define 
DibStretchBlt.htmlMETA_DIBSTRETCHBLT            0x0b41 
X #77 
- 


#define 
ExtFloodFill.htmlMETA_EXTFLOODFILL             0x0548 
X #44 
X #44 


#define 
DeleteObject.htmlMETA_DELETEOBJECT             0x01f0 
X 
X 


#define 
CreatePenIndirect.htmlMETA_CREATEPENINDIRECT        0x02FA 
X 
X 


#define 
META_CREATEFONTINDIRECT      0x02FB 


#define 
CreateBrushIndirect.htmlMETA_CREATEBRUSHINDIRECT      0x02FC 
X 
X 


#define 
CreateRegion.htmlMETA_CREATEREGION             0x06FF 
X #44 
X #44 



#define 
StretchDib.htmlMETA_STRETCHDIB               0x0f43 
X 
X 



#define 
META_SETTEXTJUSTIFICATION    0x020A 
X #44 
- 



These opcodes are not seen in the wild, so realworld instances of these are welcome, they all appear
to get translated into the equivalent that is prefixed with DIB




#define 
META_BITBLT                  0x0922 


#define 
META_STRETCHBLT              0x0B23 
X #77 
- 



#define 
META_CREATEPATTERNBRUSH      0x01F9 



These opcodes are all related to palettes, and i dont think they matter at all, information to the contrary is
welcome, these are only implemented to the degree that they dont mess up object counting





#define 
META_SELECTPALETTE           0x0234 


#define 
META_REALIZEPALETTE          0x0035 


#define 
META_ANIMATEPALETTE          0x0436 


#define 
META_SETPALENTRIES           0x0037 


#define 
META_RESIZEPALETTE           0x0139 


#define 
META_CREATEPALETTE           0x00f7 



These opcodes are unimplemented, for the reason that i dont know what they are, no known documentation




#define 
unknown.htmlMETA_SETRELABS                0x0105 
? #22 
? #22 








2 
What on earth is this ?

3 
Personally considered unimportant, to be dealt with at my leisure.

4 
Untested

5 
Has no effect on the output of the wmf file.

6 
Full support pending palette handling.

7 
Uses ROP, see 
rop.htmlROP SUPPORT .


mailto:Caolan.McNamara@ul.ieCaolan.McNamara@ul.ie 
http://www.csn.ul.ie/~caolan/docs/libwmf.htmllibwmf home 




