' Classes/System/Drawing/misc.ab

Namespace System
Namespace Drawing

Enum RotateFlipType
	RotateNoneFlipNone = 0
	Rotate90FlipNone   = 1
	Rotate180FlipNone  = 2
	Rotate270FlipNone  = 3

	RotateNoneFlipX    = 4
	Rotate90FlipX      = 5
	Rotate180FlipX     = 6
	Rotate270FlipX     = 7

	RotateNoneFlipY    = 6
	Rotate90FlipY      = 7
	Rotate180FlipY     = 4
	Rotate270FlipY     = 5

	RotateNoneFlipXY   = 2
	Rotate90FlipXY     = 3
	Rotate180FlipXY    = 0
	Rotate270FlipXY    = 1
End Enum

Enum GraphicsUnit
	World = 0
	Display = 1
	Pixel = 2
	Point = 3
	Inch = 4
	Document = 5
	Millimeter = 6
End Enum

Enum FontStyle
	Regular = 0
	Bold = 1
	Italic = 2
	Strikeout = 4
	Underline = 8
End Enum

Enum TextRenderingHint
	TextRenderingHintSystemDefault = 0
	TextRenderingHintSingleBitPerPixelGridFit
	TextRenderingHintSingleBitPerPixel
	TextRenderingHintAntiAliasGridFit
	TextRenderingHintAntiAlias
	TextRenderingHintClearTypeGridFit
End Enum

Enum MetafileFrameUnit
	Pixel      = 2
	Point      = 3
	Inch       = 4
	Document   = 5
	Millimeter = 6
	Gdi
End Enum

Enum StringFormatFlags
	DirectionRightToLeft        = &h00000001
	DirectionVertical           = &h00000002
	NoFitBlackBox               = &h00000004
	DisplayFormatControl        = &h00000020
	NoFontFallback              = &h00000400
	MeasureTrailingSpaces       = &h00000800
	NoWrap                      = &h00001000
	LineLimit                   = &h00002000
	NoClip                      = &h00004000
End Enum

Enum StringTrimming
	None              = 0
	Character         = 1
	Word_             = 2
	EllipsisCharacter = 3
	EllipsisWord      = 4
	EllipsisPath      = 5
End Enum

Enum StringDigitSubstitute
	User        = 0
	None        = 1
	National    = 2
	Traditional = 3
End Enum

Enum StringAlignment
	Near   = 0
	Center = 1
	Far    = 2
End Enum

Namespace Detail
	Sub ThrowGdiplusException(status As Status)
		Select Case status
			Case Ok
				Exit Sub
'			Case OutOfMemory
'				Throw New System.OutOfMemroyException("GDI+")
			Case NotImplemented
				Throw New System.NotImplementedException("GDI+")
'			Case FileNotFoundException
'				Throw New System.IO.FileNotFoundException("GDI+")
			Case Else
				Throw New System.Exception("GDI+")
		End Select
	End Sub
End Namespace

Sub SetStatus(status As Status)
	Detail.ThrowGdiplusException(status)
End Sub

End Namespace
End Namespace
