' Classes/System/Drawing/Imaging/MetafileHeader.ab Namespace System Namespace Drawing Namespace Imaging Type Align(8) ENHMETAHEADER3 iType As DWord nSize As DWord rclBounds As RECTL rclFrame As RECTL dSignature As DWord nVersion As DWord nBytes As DWord nRecords As DWord nHandles As Word sReserved As Word nDescription As DWord offDescription As DWord nPalEntries As DWord szlDevice As SIZEL szlMillimeters As SIZEL End Type ' Placeable WMFs Type Align(2) PWMFRect16 Left As Word Top As Word Right As Word Bottom As Word End Type Type Align(2) WmfPlaceableFileHeader Key As DWord Hmf As Word BoundingBox As PWMFRect16 Inch As Word Reserved As DWord Checksum As Word End Type Const GDIP_EMFPLUSFLAGS_DISPLAY = &h00000001 Type MetafileHeader mfType As MetafileType Size As DWord version As DWord emfPlusFlags As DWord dpiX As Single dpiY As Single X As Long Y As Long Width As Long Height As Long 'Union ' WmfHeader As METAHEADER EmfHeader As ENHMETAHEADER3 'End Union emfPlusHeaderSize As Long logicalDpiX As Long logicalDpiY As Long /* Public Function MetafileType() As MetafileType Return mfType End Function Function EmfPlusHeaderSize() As DWord Return emfPlusHeaderSize End Function Function Version() As DWord Return version End Function Function EmfPlusFlags() As DWord Return emfPlusFlags End Function Function DpiX() As Single Return dpiX End Function Function DpiY() As Single Return dpiY End Function Function Bounds() As Rectangle Bounds.X = X Bounds.Y = Y Bounds.Width = Width Bounds.Height = Height End Function Function LogicalDpiX() As Single Return logicalDpiX End Function Function LogicalDpiY() As Single Return logicalDpiY End Function Function IsWmf() As BOOL IsWmf = (mfType = MetafileTypeWmf Or mfType = MetafileTypeWmfPlaceable) End Function Function IsWmfPlaceable() As BOOL IsWmfPlaceable = (mfType = MetafileTypeWmfPlaceable) End Function Function IsEmf() As BOOL IsEmf = (mfType = MetafileTypeEmf) End Function Function IsEmfOrEmfPlus() As BOOL IsEmfOrEmfPlus = (mfType >= MetafileTypeEmf) End Function Function IsEmfPlus() As BOOL IsEmfPlus = (mfType >= MetafileTypeEmfPlusOnly) End Function Function IsEmfPlusDual() As BOOL IsEmfPlusDual = (mfType = MetafileTypeEmfPlusDual) End Function Function IsEmfPlusOnly() As BOOL IsEmfPlusOnly = (mfType = MetafileTypeEmfPlusOnly) End Function Function IsDisplay() As BOOL If IsEmfPlus() <> FALSE And ((EmfPlusFlags And GDIP_EMFPLUSFLAGS_DISPLAY) <> 0) Then IsDisplay = TRUE Else IsDisplay = FALSE End If End Function Function WmfHeader() As *METAHEADER 'const METAHEADER* const If IsWmf() Then Return VarPtr(EmfHeader) 'VarPtr(WmfHeader) Else Return 0 End If End Function Function GetEmfHeader() As *ENHMETAHEADER3 If IsEmfOrEmfPlus() Then Return VarPtr(EmfHeader) 'VarPtr(WmfHeader) Else Return 0 End If End Function */ End Type End Namespace End Namespace End Namespace