' GdiPlusEnums.ab

Const FlatnessDefault = 1.0 / 4.0

TypeDef GraphicsState = DWord

Const Enum CustomLineCapType
	CustomLineCapTypeDefault         = 0
	CustomLineCapTypeAdjustableArrow = 1
End Enum

Const Enum ImageType
	ImageTypeUnknown    ' 0
	ImageTypeBitmap     ' 1
	ImageTypeMetafile   ' 2
End Enum

Const Enum BrushType
	BrushTypeSolidColor       = 0
	BrushTypeHatchFill        = 1
	BrushTypeTextureFill      = 2
	BrushTypePathGradient     = 3
	BrushTypeLinearGradient   = 4
End Enum

Const Enum ObjectType
	ObjectTypeInvalid
	ObjectTypeBrush
	ObjectTypePen
	ObjectTypePath
	ObjectTypeRegion
	ObjectTypeImage
	ObjectTypeFont
	ObjectTypeStringFormat
	ObjectTypeImageAttributes
	ObjectTypeCustomLineCap

'	ObjectTypeMax = ObjectTypeCustomLineCap
'	ObjectTypeMin = ObjectTypeBrush
End Enum

Const ObjectTypeIsValid(type_) = (type_ >= ObjectTypeMin) And (type_ <= ObjectTypeMax)

Const GDIP_EMFPLUS_RECORD_BASE        = &h00004000
Const GDIP_WMF_RECORD_BASE            = &h00010000
Const GDIP_WMF_RECORD_TO_EMFPLUS(n)   = ((n) Or GDIP_WMF_RECORD_BASE) ' As EmfPlusRecordType
Const GDIP_EMFPLUS_RECORD_TO_WMF(n)   = ((n) And (Not GDIP_WMF_RECORD_BASE))
'Const GDIP_IS_WMF_RECORDTYPE(n)       (((n) And GDIP_WMF_RECORD_BASE) <> 0)
Function GDIP_IS_WMF_RECORDTYPE(n As DWord) As BOOL
	If (n And GDIP_WMF_RECORD_BASE) <> 0 Then
		GDIP_IS_WMF_RECORDTYPE = TRUE
	Else
		GDIP_IS_WMF_RECORDTYPE = FALSE
	End If
End Function

Const Enum DriverStringOptions
	DriverStringOptionsCmapLookup             = 1
	DriverStringOptionsVertical               = 2
	DriverStringOptionsRealizedAdvance        = 4
	DriverStringOptionsLimitSubpixel          = 8
End Enum

Const Enum EmfToWmfBitsFlags
	EmfToWmfBitsFlagsDefault          = &h00000000
	EmfToWmfBitsFlagsEmbedEmf         = &h00000001
	EmfToWmfBitsFlagsIncludePlaceable = &h00000002
	EmfToWmfBitsFlagsNoXORClip        = &h00000004
End Enum

Const Enum GpTestControlEnum
	TestControlForceBilinear = 0
	TestControlNoICM = 1
	TestControlGetBuildNumber = 2
End Enum
