source: branch/egtra-gdiplus/GdiPlusTypes.ab

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

GDI+に対して名前空間で囲ったものの、現在コンパイルできないため分岐させておく

File size: 16.4 KB
Line 
1' GdiPlusTypes.ab
2
3#ifndef __GDIPLUSTYPES_AB__
4#define __GDIPLUSTYPES_AB__
5
6#require <Classes/System/Math.ab>
7#require <Classes/System/Drawing/Imaging/misc.ab>
8
9#require <Classes/System/Drawing/SizeF.ab>
10#require <Classes/System/Drawing/Size.ab>
11#require <Classes/System/Drawing/PointF.ab>
12#require <Classes/System/Drawing/Point.ab>
13#require <Classes/System/Drawing/RectangleF.ab>
14#require <Classes/System/Drawing/Rectangle.ab>
15#require <Classes/System/Drawing/CharacterRange.ab>
16
17Namespace Gdiplus
18
19TypeDef ImageAbort = *Function(p As VoidPtr) As BOOL
20TypeDef DrawImageAbort = ImageAbort
21TypeDef GetThumbnailImageAbort = ImageAbort
22
23TypeDef EnumerateMetafileProc = *Function(recordType As System.Drawing.Imaging.EmfPlusRecordType, flags As DWord, dataSize As DWord, data As BytePtr, callbackData As VoidPtr) As BOOL
24
25'Const REAL_MAX = FLT_MAX
26'Const REAL_MIN = FLT_MIN
27'Const REAL_TOLERANCE = (FLT_MIN * 100)
28'Const REAL_EPSILON = 1.192092896e-07 'FLT_EPSILON
29
30Enum Status
31 Ok = 0
32 GenericError = 1
33 InvalidParameter = 2
34 OutOfMemory = 3
35 ObjectBusy = 4
36 InsufficientBuffer = 5
37 NotImplemented = 6
38 Win32Error = 7
39 WrongState = 8
40 Aborted = 9
41 FileNotFound = 10
42 ValueOverflow = 11
43 AccessDenied = 12
44 UnknownImageFormat = 13
45 FontFamilyNotFound = 14
46 FontStyleNotFound = 15
47 NotTrueTypeFont = 16
48 UnsupportedGdiplusVersion = 17
49 GdiplusNotInitialized = 18
50 PropertyNotFound = 19
51 PropertyNotSupported = 20
52End Enum
53
54Class PathData
55Public
56 Sub PathData()
57 Count = 0
58 Points = NULL
59 Types = NULL
60 End Sub
61
62 Sub ~PathData()
63 If Points <> NULL Then
64 Delete Points
65 End If
66 If Types <> NULL Then
67 Delete Types
68 End Sub
69
70Private
71/*
72 Sub PathData(ByRef pd As PathData)
73 Debug
74 End Sub
75*/
76 Sub Operator =(ByRef pd As PathData)
77 Debug
78 End Sub
79
80Public
81 Count As Long
82 Points As *System.Drawing.PointF
83 Types As *BYTE
84End Class
85
86' --------
87
88TypeDef ARGB = DWord
89TypeDef ARGB64 = QWord
90
91Const ALPHA_SHIFT = 24 As DWord
92Const RED_SHIFT = 16 As DWord
93Const GREEN_SHIFT = 8 As DWord
94Const BLUE_SHIFT = 0 As DWord
95Const ALPHA_MASK = ((&hff As ARGB) << ALPHA_SHIFT)
96
97Const GetPixelFormatSize(pixfmt) = ((((pixfmt As PixelFormat) >> 8) And &hff) As DWord)
98
99Const IsIndexedPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Indexed) <> 0) As BOOL)
100
101Const IsAlphaPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Alpha) <> 0) As BOOL)
102
103Const IsExtendedPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Extended) <> 0) As BOOL)
104
105Const IsCanonicalPixelFormat(pixfmt) = ((((pixfmt As PixelFormat) And PixelFormat.Canonical) <> 0) As BOOL)
106
107Type Align(8) ColorPalette
108 Flags As DWord
109 Count As DWord
110 Entries[1] As ARGB
111End Type
112
113Type ColorMatrix
114 m[5][5] As Single
115End Type
116
117Type Align(8) EncoderParameter
118 Guid As GUID
119 NumberOfValues As DWord
120 EncoderType As DWord '元はTypeという名前
121 Value As VoidPtr
122End Type
123
124Type Align(8) EncoderParameters
125 Count As DWord
126 Parameter[1] As EncoderParameter
127End Type
128
129Const PropertyTagTypeByte = 1
130Const PropertyTagTypeASCII = 2
131Const PropertyTagTypeShort = 3
132Const PropertyTagTypeLong = 4
133Const PropertyTagTypeRational = 5
134Const PropertyTagTypeUndefined = 7
135Const PropertyTagTypeSLONG = 9
136Const PropertyTagTypeSRational = 10
137
138Const PropertyTagExifIFD = &h8769
139Const PropertyTagGpsIFD = &h8825
140
141Const PropertyTagNewSubfileType = &h00FE
142Const PropertyTagSubfileType = &h00FF
143Const PropertyTagImageWidth = &h0100
144Const PropertyTagImageHeight = &h0101
145Const PropertyTagBitsPerSample = &h0102
146Const PropertyTagCompression = &h0103
147Const PropertyTagPhotometricInterp = &h0106
148Const PropertyTagThreshHolding = &h0107
149Const PropertyTagCellWidth = &h0108
150Const PropertyTagCellHeight = &h0109
151Const PropertyTagFillOrder = &h010A
152Const PropertyTagDocumentName = &h010D
153Const PropertyTagImageDescription = &h010E
154Const PropertyTagEquipMake = &h010F
155Const PropertyTagEquipModel = &h0110
156Const PropertyTagStripOffsets = &h0111
157Const PropertyTagOrientation = &h0112
158Const PropertyTagSamplesPerPixel = &h0115
159Const PropertyTagRowsPerStrip = &h0116
160Const PropertyTagStripBytesCount = &h0117
161Const PropertyTagMinSampleValue = &h0118
162Const PropertyTagMaxSampleValue = &h0119
163Const PropertyTagXResolution = &h011A ' Image resolution in width direction
164Const PropertyTagYResolution = &h011B ' Image resolution in height direction
165Const PropertyTagPlanarConfig = &h011C ' Image data arrangement
166Const PropertyTagPageName = &h011D
167Const PropertyTagXPosition = &h011E
168Const PropertyTagYPosition = &h011F
169Const PropertyTagFreeOffset = &h0120
170Const PropertyTagFreeByteCounts = &h0121
171Const PropertyTagGrayResponseUnit = &h0122
172Const PropertyTagGrayResponseCurve = &h0123
173Const PropertyTagT4Option = &h0124
174Const PropertyTagT6Option = &h0125
175Const PropertyTagResolutionUnit = &h0128 ' Unit of X and Y resolution
176Const PropertyTagPageNumber = &h0129
177Const PropertyTagTransferFuncition = &h012D
178Const PropertyTagSoftwareUsed = &h0131
179Const PropertyTagDateTime = &h0132
180Const PropertyTagArtist = &h013B
181Const PropertyTagHostComputer = &h013C
182Const PropertyTagPredictor = &h013D
183Const PropertyTagWhitePoint = &h013E
184Const PropertyTagPrimaryChromaticities = &h013F
185Const PropertyTagColorMap = &h0140
186Const PropertyTagHalftoneHints = &h0141
187Const PropertyTagTileWidth = &h0142
188Const PropertyTagTileLength = &h0143
189Const PropertyTagTileOffset = &h0144
190Const PropertyTagTileByteCounts = &h0145
191Const PropertyTagInkSet = &h014C
192Const PropertyTagInkNames = &h014D
193Const PropertyTagNumberOfInks = &h014E
194Const PropertyTagDotRange = &h0150
195Const PropertyTagTargetPrinter = &h0151
196Const PropertyTagExtraSamples = &h0152
197Const PropertyTagSampleFormat = &h0153
198Const PropertyTagSMinSampleValue = &h0154
199Const PropertyTagSMaxSampleValue = &h0155
200Const PropertyTagTransferRange = &h0156
201
202Const PropertyTagJPEGProc = &h0200
203Const PropertyTagJPEGInterFormat = &h0201
204Const PropertyTagJPEGInterLength = &h0202
205Const PropertyTagJPEGRestartInterval = &h0203
206Const PropertyTagJPEGLosslessPredictors = &h0205
207Const PropertyTagJPEGPointTransforms = &h0206
208Const PropertyTagJPEGQTables = &h0207
209Const PropertyTagJPEGDCTables = &h0208
210Const PropertyTagJPEGACTables = &h0209
211
212Const PropertyTagYCbCrCoefficients = &h0211
213Const PropertyTagYCbCrSubsampling = &h0212
214Const PropertyTagYCbCrPositioning = &h0213
215Const PropertyTagREFBlackWhite = &h0214
216
217Const PropertyTagICCProfile = &h8773 ' This TAG is defined by ICC
218 ' for embedded ICC in TIFF
219Const PropertyTagGamma = &h0301
220Const PropertyTagICCProfileDescriptor = &h0302
221Const PropertyTagSRGBRenderingIntent = &h0303
222
223Const PropertyTagImageTitle = &h0320
224Const PropertyTagCopyright = &h8298
225
226' Extra TAGs (Like Adobe Image Information tags etc.)
227
228Const PropertyTagResolutionXUnit = &h5001
229Const PropertyTagResolutionYUnit = &h5002
230Const PropertyTagResolutionXLengthUnit = &h5003
231Const PropertyTagResolutionYLengthUnit = &h5004
232Const PropertyTagPrintFlags = &h5005
233Const PropertyTagPrintFlagsVersion = &h5006
234Const PropertyTagPrintFlagsCrop = &h5007
235Const PropertyTagPrintFlagsBleedWidth = &h5008
236Const PropertyTagPrintFlagsBleedWidthScale = &h5009
237Const PropertyTagHalftoneLPI = &h500A
238Const PropertyTagHalftoneLPIUnit = &h500B
239Const PropertyTagHalftoneDegree = &h500C
240Const PropertyTagHalftoneShape = &h500D
241Const PropertyTagHalftoneMisc = &h500E
242Const PropertyTagHalftoneScreen = &h500F
243Const PropertyTagJPEGQuality = &h5010
244Const PropertyTagGridSize = &h5011
245Const PropertyTagThumbnailFormat = &h5012 ' 1 = JPEG, 0 = RAW RGB
246Const PropertyTagThumbnailWidth = &h5013
247Const PropertyTagThumbnailHeight = &h5014
248Const PropertyTagThumbnailColorDepth = &h5015
249Const PropertyTagThumbnailPlanes = &h5016
250Const PropertyTagThumbnailRawBytes = &h5017
251Const PropertyTagThumbnailSize = &h5018
252Const PropertyTagThumbnailCompressedSize = &h5019
253Const PropertyTagColorTransferFunction = &h501A
254Const PropertyTagThumbnailData = &h501B' RAW thumbnail bits in
255 ' JPEG format or RGB format
256 ' depends on
257 ' PropertyTagThumbnailFormat
258
259' Thumbnail related TAGs
260
261Const PropertyTagThumbnailImageWidth = &h5020 ' Thumbnail width
262Const PropertyTagThumbnailImageHeight = &h5021 ' Thumbnail height
263Const PropertyTagThumbnailBitsPerSample = &h5022 ' Number of bits per
264 ' component
265Const PropertyTagThumbnailCompression = &h5023 ' Compression Scheme
266Const PropertyTagThumbnailPhotometricInterp = &h5024 ' Pixel composition
267Const PropertyTagThumbnailImageDescription = &h5025 ' Image Tile
268Const PropertyTagThumbnailEquipMake = &h5026 ' Manufacturer of Image
269 ' Input equipment
270Const PropertyTagThumbnailEquipModel = &h5027 ' Model of Image input
271 ' equipment
272Const PropertyTagThumbnailStripOffsets = &h5028 ' Image data location
273Const PropertyTagThumbnailOrientation = &h5029 ' Orientation of image
274Const PropertyTagThumbnailSamplesPerPixel = &h502A ' Number of components
275Const PropertyTagThumbnailRowsPerStrip = &h502B ' Number of rows per strip
276Const PropertyTagThumbnailStripBytesCount = &h502C ' Bytes per compressed
277 ' strip
278Const PropertyTagThumbnailResolutionX = &h502D ' Resolution in width
279 ' direction
280Const PropertyTagThumbnailResolutionY = &h502E ' Resolution in height
281 ' direction
282Const PropertyTagThumbnailPlanarConfig = &h502F ' Image data arrangement
283Const PropertyTagThumbnailResolutionUnit = &h5030 ' Unit of X and Y
284 ' Resolution
285Const PropertyTagThumbnailTransferFunction = &h5031 ' Transfer function
286Const PropertyTagThumbnailSoftwareUsed = &h5032 ' Software used
287Const PropertyTagThumbnailDateTime = &h5033 ' File change date and
288 ' time
289Const PropertyTagThumbnailArtist = &h5034 ' Person who created the
290 ' image
291Const PropertyTagThumbnailWhitePoint = &h5035 ' White point chromaticity
292Const PropertyTagThumbnailPrimaryChromaticities = &h5036
293 ' Chromaticities of
294 ' primaries
295Const PropertyTagThumbnailYCbCrCoefficients = &h5037 ' Color space transforma-
296 ' tion coefficients
297Const PropertyTagThumbnailYCbCrSubsampling = &h5038 ' Subsampling ratio of Y
298 ' to C
299Const PropertyTagThumbnailYCbCrPositioning = &h5039 ' Y and C position
300Const PropertyTagThumbnailRefBlackWhite = &h503A ' Pair of black and white
301 ' reference values
302Const PropertyTagThumbnailCopyRight = &h503B ' CopyRight holder
303
304Const PropertyTagLuminanceTable = &h5090
305Const PropertyTagChrominanceTable = &h5091
306
307Const PropertyTagFrameDelay = &h5100
308Const PropertyTagLoopCount = &h5101
309
310Const PropertyTagPixelUnit = &h5110 ' Unit specifier for pixel/unit
311Const PropertyTagPixelPerUnitX = &h5111 ' Pixels per unit in X
312Const PropertyTagPixelPerUnitY = &h5112 ' Pixels per unit in Y
313Const PropertyTagPaletteHistogram = &h5113 ' Palette histogram
314
315' EXIF specific tag
316
317Const PropertyTagExifExposureTime = &h829A
318Const PropertyTagExifFNumber = &h829D
319
320Const PropertyTagExifExposureProg = &h8822
321Const PropertyTagExifSpectralSense = &h8824
322Const PropertyTagExifISOSpeed = &h8827
323Const PropertyTagExifOECF = &h8828
324
325Const PropertyTagExifVer = &h9000
326Const PropertyTagExifDTOrig = &h9003 ' Date & time of original
327Const PropertyTagExifDTDigitized = &h9004 ' Date & time of digital data generation
328
329Const PropertyTagExifCompConfig = &h9101
330Const PropertyTagExifCompBPP = &h9102
331
332Const PropertyTagExifShutterSpeed = &h9201
333Const PropertyTagExifAperture = &h9202
334Const PropertyTagExifBrightness = &h9203
335Const PropertyTagExifExposureBias = &h9204
336Const PropertyTagExifMaxAperture = &h9205
337Const PropertyTagExifSubjectDist = &h9206
338Const PropertyTagExifMeteringMode = &h9207
339Const PropertyTagExifLightSource = &h9208
340Const PropertyTagExifFlash = &h9209
341Const PropertyTagExifFocalLength = &h920A
342Const PropertyTagExifMakerNote = &h927C
343Const PropertyTagExifUserComment = &h9286
344Const PropertyTagExifDTSubsec = &h9290 ' Date & Time subseconds
345Const PropertyTagExifDTOrigSS = &h9291 ' Date & Time original subseconds
346Const PropertyTagExifDTDigSS = &h9292 ' Date & TIme digitized subseconds
347
348Const PropertyTagExifFPXVer = &hA000
349Const PropertyTagExifColorSpace = &hA001
350Const PropertyTagExifPixXDim = &hA002
351Const PropertyTagExifPixYDim = &hA003
352Const PropertyTagExifRelatedWav = &hA004 ' related sound file
353Const PropertyTagExifInterop = &hA005
354Const PropertyTagExifFlashEnergy = &hA20B
355Const PropertyTagExifSpatialFR = &hA20C ' Spatial Frequency Response
356Const PropertyTagExifFocalXRes = &hA20E ' Focal Plane X Resolution
357Const PropertyTagExifFocalYRes = &hA20F ' Focal Plane Y Resolution
358Const PropertyTagExifFocalResUnit = &hA210 ' Focal Plane Resolution Unit
359Const PropertyTagExifSubjectLoc = &hA214
360Const PropertyTagExifExposureIndex = &hA215
361Const PropertyTagExifSensingMethod = &hA217
362Const PropertyTagExifFileSource = &hA300
363Const PropertyTagExifSceneType = &hA301
364Const PropertyTagExifCfaPattern = &hA302
365
366Const PropertyTagGpsVer = &h0000
367Const PropertyTagGpsLatitudeRef = &h0001
368Const PropertyTagGpsLatitude = &h0002
369Const PropertyTagGpsLongitudeRef = &h0003
370Const PropertyTagGpsLongitude = &h0004
371Const PropertyTagGpsAltitudeRef = &h0005
372Const PropertyTagGpsAltitude = &h0006
373Const PropertyTagGpsGpsTime = &h0007
374Const PropertyTagGpsGpsSatellites = &h0008
375Const PropertyTagGpsGpsStatus = &h0009
376Const PropertyTagGpsGpsMeasureMode = &h00A
377Const PropertyTagGpsGpsDop = &h000B ' Measurement precision
378Const PropertyTagGpsSpeedRef = &h000C
379Const PropertyTagGpsSpeed = &h000D
380Const PropertyTagGpsTrackRef = &h000E
381Const PropertyTagGpsTrack = &h000F
382Const PropertyTagGpsImgDirRef = &h0010
383Const PropertyTagGpsImgDir = &h0011
384Const PropertyTagGpsMapDatum = &h0012
385Const PropertyTagGpsDestLatRef = &h0013
386Const PropertyTagGpsDestLat = &h0014
387Const PropertyTagGpsDestLongRef = &h0015
388Const PropertyTagGpsDestLong = &h0016
389Const PropertyTagGpsDestBearRef = &h0017
390Const PropertyTagGpsDestBear = &h0018
391Const PropertyTagGpsDestDistRef = &h0019
392Const PropertyTagGpsDestDist = &h001A
393
394Type ImageCodecInfo
395 Clsid As CLSID
396 FormatID As GUID
397 CodecName As PCWSTR
398 DllName As PCWSTR
399 FormatDescription As PCWSTR
400 FilenameExtension As PCWSTR
401 MimeType As PCWSTR
402 Flags As DWord
403 Version As DWord
404 SigCount As DWord
405 SigSize As DWord
406 SigPattern As *Byte
407 SigMask As DWord
408End Type
409
410End Namespace
411
412#endif '__GDIPLUSTYPES_AB__
Note: See TracBrowser for help on using the repository browser.