The Metafile structure contains functions and structures to create and operate on metafiles. A metafile is essentially a recording of drawing operations which can be stored in a file, passed through the clipboard and replayed as needed. There are two types of metafile: the old form represented by the HMETAFILE type and the new, enhanced metafile, represented by the HENHMETAFILE type.
structure Metafile :
sig
type HENHMETAFILE
type HMETAFILE
type HDC
type RECT = { top: int, left: int, bottom: int, right: int }
type SIZE = { cx: int, cy: int }
datatype MapMode = datatype Transform.MapMode
type METAFILEPICT = {mm: MapMode, size: SIZE, hMF: HMETAFILE}
type ENHMETAHEADER =
{
bounds: RECT, frame: RECT, fileSize: int, records: int,
handles: int, palEntries: int, resolutionPixels: SIZE,
resolutionMM: SIZE, openGL: bool
}
val CloseEnhMetaFile : HDC -> HENHMETAFILE
val CloseMetaFile : HDC -> HMETAFILE
val CopyEnhMetaFile : HENHMETAFILE * string -> HENHMETAFILE
val CopyMetaFile : HMETAFILE * string -> HMETAFILE
val CreateEnhMetaFile :
HDC * string option * RECT *
{pictureName: string, applicationName: string} option -> HDC
val CreateMetaFile : string option -> HDC
val DeleteEnhMetaFile : HENHMETAFILE -> unit
val DeleteMetaFile : HMETAFILE -> unit
val GdiComment : HDC * Word8Vector.vector -> unit
val GetEnhMetaFile : string -> HENHMETAFILE
val GetEnhMetaFileBits : HENHMETAFILE -> Word8Vector.vector
val GetEnhMetaFileDescription :
HENHMETAFILE -> {pictureName: string, applicationName: string} option
val GetEnhMetaFileHeader : HENHMETAFILE -> ENHMETAHEADER
val GetMetaFile : string -> HMETAFILE
val GetMetaFileBitsEx : HMETAFILE -> Word8Vector.vector
val GetWinMetaFileBits :
HENHMETAFILE * Transform.MapMode * HDC -> Word8Vector.vector
val PlayEnhMetaFile : HDC * HENHMETAFILE * RECT -> unit
val PlayMetaFile : HDC * HMETAFILE -> unit
val SetEnhMetaFileBits : Word8Vector.vector -> HENHMETAFILE
val SetMetaFileBits : Word8Vector.vector -> HMETAFILE
val SetWinMetaFileBits :
Word8Vector.vector * HDC * {size: SIZE, mapMode: MapMode} option -> HENHMETAFILE
end