source: trunk/ab5.0/ablib/src/Classes/System/Drawing/Imaging/MetafileHeader.ab@ 698

Last change on this file since 698 was 698, checked in by イグトランス (egtra), 15 years ago

GDI+をコンパイルできるように修正。FontFamily, Penの追加。サンプルとして、Step 32のGDI+版を制作。
(#56)

File size: 3.1 KB
Line 
1' Classes/System/Drawing/Imaging/MetafileHeader.ab
2Namespace System
3Namespace Drawing
4Namespace Imaging
5
6Type Align(8) ENHMETAHEADER3
7 iType As DWord
8 nSize As DWord
9
10 rclBounds As RECTL
11 rclFrame As RECTL
12 dSignature As DWord
13 nVersion As DWord
14 nBytes As DWord
15 nRecords As DWord
16 nHandles As Word
17
18 sReserved As Word
19 nDescription As DWord
20
21 offDescription As DWord
22
23 nPalEntries As DWord
24 szlDevice As SIZEL
25 szlMillimeters As SIZEL
26End Type
27
28' Placeable WMFs
29
30Type Align(2) PWMFRect16
31 Left As Word
32 Top As Word
33 Right As Word
34 Bottom As Word
35End Type
36
37Type Align(2) WmfPlaceableFileHeader
38 Key As DWord
39 Hmf As Word
40 BoundingBox As PWMFRect16
41 Inch As Word
42 Reserved As DWord
43 Checksum As Word
44End Type
45
46Const GDIP_EMFPLUSFLAGS_DISPLAY = &h00000001
47
48Type MetafileHeader
49 mfType As MetafileType
50 Size As DWord
51 version As DWord
52 emfPlusFlags As DWord
53 dpiX As Single
54 dpiY As Single
55 X As Long
56 Y As Long
57 Width As Long
58 Height As Long
59 'Union
60 ' WmfHeader As METAHEADER
61 EmfHeader As ENHMETAHEADER3
62 'End Union
63 emfPlusHeaderSize As Long
64 logicalDpiX As Long
65 logicalDpiY As Long
66/*
67Public
68 Function MetafileType() As MetafileType
69 Return mfType
70 End Function
71
72 Function EmfPlusHeaderSize() As DWord
73 Return emfPlusHeaderSize
74 End Function
75
76 Function Version() As DWord
77 Return version
78 End Function
79
80 Function EmfPlusFlags() As DWord
81 Return emfPlusFlags
82 End Function
83
84 Function DpiX() As Single
85 Return dpiX
86 End Function
87
88 Function DpiY() As Single
89 Return dpiY
90 End Function
91
92 Function Bounds() As Rectangle
93 Bounds.X = X
94 Bounds.Y = Y
95 Bounds.Width = Width
96 Bounds.Height = Height
97 End Function
98
99 Function LogicalDpiX() As Single
100 Return logicalDpiX
101 End Function
102
103 Function LogicalDpiY() As Single
104 Return logicalDpiY
105 End Function
106
107 Function IsWmf() As BOOL
108 IsWmf = (mfType = MetafileTypeWmf Or mfType = MetafileTypeWmfPlaceable)
109 End Function
110
111 Function IsWmfPlaceable() As BOOL
112 IsWmfPlaceable = (mfType = MetafileTypeWmfPlaceable)
113 End Function
114
115 Function IsEmf() As BOOL
116 IsEmf = (mfType = MetafileTypeEmf)
117 End Function
118
119 Function IsEmfOrEmfPlus() As BOOL
120 IsEmfOrEmfPlus = (mfType >= MetafileTypeEmf)
121 End Function
122
123 Function IsEmfPlus() As BOOL
124 IsEmfPlus = (mfType >= MetafileTypeEmfPlusOnly)
125 End Function
126
127 Function IsEmfPlusDual() As BOOL
128 IsEmfPlusDual = (mfType = MetafileTypeEmfPlusDual)
129 End Function
130
131 Function IsEmfPlusOnly() As BOOL
132 IsEmfPlusOnly = (mfType = MetafileTypeEmfPlusOnly)
133 End Function
134
135 Function IsDisplay() As BOOL
136 If IsEmfPlus() <> FALSE And ((EmfPlusFlags And GDIP_EMFPLUSFLAGS_DISPLAY) <> 0) Then
137 IsDisplay = TRUE
138 Else
139 IsDisplay = FALSE
140 End If
141 End Function
142
143 Function WmfHeader() As *METAHEADER 'const METAHEADER* const
144 If IsWmf() Then
145 Return VarPtr(EmfHeader) 'VarPtr(WmfHeader)
146 Else
147 Return 0
148 End If
149 End Function
150
151 Function GetEmfHeader() As *ENHMETAHEADER3
152 If IsEmfOrEmfPlus() Then
153 Return VarPtr(EmfHeader) 'VarPtr(WmfHeader)
154 Else
155 Return 0
156 End If
157 End Function
158*/
159End Type
160
161End Namespace
162End Namespace
163End Namespace
Note: See TracBrowser for help on using the repository browser.