Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/Brush.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/Brush.ab	(revision 701)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/Brush.ab	(revision 701)
@@ -0,0 +1,449 @@
+' Classes/System/Drawing/Brush.ab
+
+Namespace System
+Namespace Drawing
+
+Class Brush
+	Implements IDisposable, ICloneable
+Public
+	Sub Dispose()
+		GdipDeleteBrush(nativeBrush)
+		nativeBrush = 0
+	End Sub
+
+	Sub ~Brush()
+		Dispose()
+	End Sub
+
+	Function Clone() As Brush
+		Dim brush As *GpBrush
+		SetStatus(GdipCloneBrush(nativeBrush, brush))
+		Try
+			Clone = New Brush(brush)
+		Catch e As Exception
+			GdipDeleteBrush(brush)
+			Throw e
+		End Try
+	End Function
+
+	Function GetType() As BrushType
+		GetType = -1 As BrushType
+		SetStatus(GdipGetBrushType(nativeBrush, GetType))
+	End Function
+
+	Function NativeBrush() As *GpBrush
+		NativeBrush = nativeBrush
+	End Function
+
+	Sub Brush(native As *GpBrush)
+		nativeBrush = native
+	End Sub
+
+Private
+	nativeBrush As *GpBrush
+End Class
+
+Class SolidBrush
+	Inherits Brush
+Public
+
+	Sub SolidBrush(c As Color)
+		Brush(CreateSolidBrush(c))
+	End Sub
+
+	Function Color() As Color
+		SetStatus(GdipGetSolidFillColor(nativeBrush As *GpSolidFill, Color))
+	End Function
+
+	Sub SetColor(c As Color)
+		SetStatus(GdipSetSolidFillColor(nativeBrush As *GpSolidFill, c))
+	End Sub
+
+Private
+	Static Function CreateSolidBrush(c As Color) As *GpBrush
+		SetStatus(GdipCreateSolidFill(c, CreateSolidBrush))
+	End Function
+End Class
+
+Class TextureBrush
+	Inherits Brush
+Public
+	Sub TextureBrush(image As Image) '暫定
+		Brush(CreateTexture(image.NativeImage, System.Drawing.Drawing2D.WrapMode.Tile) As *GpBrush)
+	End Sub
+
+	Sub TextureBrush(image As Image, wrapMode /*= WrapMode.Tile*/ As Drawing2D.WrapMode)
+		Brush(CreateTexture(image.NativeImage, wrapMode) As *GpBrush)
+	End Sub
+
+	Static Function CreateTexture(image As *GpImage, wrapMode As Drawing2D.WrapMode) As *GpTexture
+		SetStatus(GdipCreateTexture(image, wrapMode, CreateTexture))
+	End Function
+
+	Sub TextureBrush(image As Image, wrapMode As Drawing2D.WrapMode, ByRef dstRect As Rectangle)
+		Brush(CreateTexture2I(image.NativeImage, wrapMode, dstRect) As *GpBrush)
+	End Sub
+	   
+	Static Function CreateTexture2I(image As *GpImage, wrapMode As Drawing2D.WrapMode, ByRef rc As Rectangle) As *GpTexture
+		SetStatus(GdipCreateTexture2I(image, wrapMode, rc.X, rc.Y, rc.Width, rc.Height, CreateTexture2I))
+	End Function
+
+	Sub TextureBrush(image As Image, wrapMode As Drawing2D.WrapMode, ByRef dstRect As RectangleF)
+		Brush(CreateTexture2(image.NativeImage, wrapMode, dstRect) As *GpBrush)
+	End Sub
+	   
+	Static Function CreateTexture2(image As *GpImage, wrapMode As Drawing2D.WrapMode, ByRef rc As RectangleF) As *GpTexture
+		SetStatus(GdipCreateTexture2(image, wrapMode, rc.X, rc.Y, rc.Width, rc.Height, CreateTexture2))
+	End Function
+
+	Sub TextureBrush(image As Image, ByRef dstRect As Rectangle, imageAttributes = Nothing As ImageAttributes)
+		Brush(CreateTextureIAI(image.NativeImage, dstRect, getNativeImageAttributes(imageAttributes)) As *GpBrush)
+	End Sub
+
+	Static Function CreateTextureIAI(image As *GpImage, ByRef rc As Rectangle, imageAttr = 0 As *GpImageAttributes) As *GpTexture
+		SetStatus(GdipCreateTextureIAI(image, imageAttr, rc.X, rc.Y, rc.Width, rc.Height, CreateTextureIAI))
+	End Function
+
+	Sub TextureBrush(image As Image, ByRef dstRect As RectangleF, imageAttributes = Nothing As ImageAttributes)
+		Brush(CreateTextureIA(image.NativeImage, dstRect, getNativeImageAttributes(imageAttributes)) As *GpBrush)
+	End Sub
+
+	Static Function CreateTextureIA(image As *GpImage, ByRef rc As RectangleF, imageAttr = 0 As *GpImageAttributes) As *GpTexture
+		SetStatus(GdipCreateTextureIA(image, imageAttr, rc.X, rc.Y, rc.Width, rc.Height, CreateTextureIA))
+	End Function
+
+	Sub Transform(matrix As Drawing2D.Matrix)
+		SetStatus(GdipSetTextureTransform(nativeBrush As *GpTexture, matrix.NativeMatrix))
+	End Sub
+
+	Function Transform() As Drawing2D.Matrix
+		Dim matrix As *GpMatrix
+		SetStatus(GdipGetTextureTransform(nativeBrush As *GpTexture, matrix))
+		Transform = New Matrix(matrix)
+	End Function
+
+	Sub ResetTransform()
+		SetStatus(GdipResetTextureTransform(nativeBrush As *GpTexture))
+	End Sub
+
+	Sub MultiplyTransform(matrix As Drawing2D.Matrix, order /*= Drawing2D.MatrixOrder.Prepend*/ As Drawing2D.MatrixOrder)
+		SetStatus(GdipMultiplyTextureTransform(nativeBrush As *GpTexture, matrix.NativeMatrix, order))
+	End Sub
+
+	Sub TranslateTransform(dx As Single, dy As Single, order /*= Drawing2D.MatrixOrder.Prepend*/ As Drawing2D.MatrixOrder)
+		SetStatus(GdipTranslateTextureTransform(nativeBrush As *GpTexture, dx, dy, order))
+	End Sub
+
+	Sub ScaleTransform(sx As Single, sy As Single, order /*= Drawing2D.MatrixOrder.Prepend*/ As Drawing2D.MatrixOrder)
+		SetStatus(GdipScaleTextureTransform(nativeBrush As *GpTexture, sx, sy, order))
+	End Sub
+
+	Sub RotateTransform(angle As Single, order /*= Drawing2D.MatrixOrder.Prepend*/ As Drawing2D.MatrixOrder)
+		SetStatus(GdipRotateTextureTransform(nativeBrush As *GpTexture, angle, order))
+	End Sub
+
+	Sub WrapMode(wrapMode As Drawing2D.WrapMode)
+		SetStatus(GdipSetTextureWrapMode(nativeBrush As *GpTexture, wrapMode))
+	End Sub
+/*
+	Function WrapMode() As Drawing2D.WrapMode
+		SetStatus(GdipGetTextureWrapMode(nativeBrush As *GpTexture, WrapMode))
+	End Function
+*/
+	Function GetImage() As Image
+		Dim image As *GpImage
+		SetStatus(GdipGetTextureImage(nativeBrush As *GpTexture, image))
+		GetImage = New Image(image)
+	End Function
+
+Private
+	Static Function getNativeImageAttributes(imageAttr As ImageAttributes) As *GpImageAttributes
+		If ActiveBasic.IsNothing(imageAttr) Then
+			getNativeImageAttributes = 0
+		Else
+			getNativeImageAttributes = imageAttr.nativeImage
+		End If
+	End Function
+End Class
+
+Namespace Drawing2D
+
+Class HatchBrush
+	Inherits Brush
+Public
+	Sub HatchBrush(hatchStyle As HatchStyle, foreColor As Color, backColor = 0 As Color)
+		Brush(CreateHatchBrush(hatchStyle, foreColor, backColor) As *GpBrush)
+	End Sub
+/*
+	Function HatchStyle() As HatchStyle
+		SetStatus(GdipGetHatchStyle(NativeBrush As *GpHatch, HatchStyle))
+	End Function
+*/
+	Function ForegroundColor() As Color
+		SetStatus(GdipGetHatchForegroundColor(NativeBrush As *GpHatch, ForegroundColor))
+	End Function
+
+	Function BackgroundColor() As Color
+		SetStatus(GdipGetHatchBackgroundColor(NativeBrush As *GpHatch, BackgroundColor))
+	End Function
+
+Private
+	Static Function CreateHatchBrush(hatchStyle As HatchStyle, foreColor As ARGB, backColor As ARGB) As *GpHatch
+		SetStatus(GdipCreateHatchBrush(hatchStyle, foreColor, backColor, CreateHatchBrush))
+	End Function
+End Class
+
+Class LinearGradientBrush
+	Inherits Brush
+Public
+
+	Sub LinearGradientBrush(ByRef pt1 As Point, ByRef pt2 As Point, c1 As Color, c2 As Color)
+		Brush(CreateLineBrush(pt1, pt2, c1, c2) As *GpBrush)
+	End Sub
+
+	Sub LinearGradientBrush(ByRef pt1 As PointF, ByRef pt2 As PointF, c1 As Color, c2 As Color)
+		Brush(CreateLineBrush(pt1, pt2, c1, c2) As *GpBrush)
+	End Sub
+
+	Sub LinearGradientBrush(ByRef rc As Rectangle, c1 As Color, c2 As Color, mode As LinearGradientMode)
+		Brush(CreateLineBrushFromRect(rc, c1, c2, mode) As *GpBrush)
+	End Sub
+
+	Sub LinearGradientBrush(ByRef rc As RectangleF, c1 As Color, c2 As Color, mode As LinearGradientMode)
+		Brush(CreateLineBrushFromRect(rc, c1, c2, mode) As *GpBrush)
+	End Sub
+
+	Sub LinearGradientBrush(ByRef rc As Rectangle, c1 As Color, c2 As Color, angle As Single, isAngleScalable = False As Boolean)
+		Brush(CreateLineBrushFromRectWithAngle(rc, c1, c2, angle, isAngleScalable) As *GpBrush)
+	End Sub
+
+	Sub LinearGradientBrush(ByRef rc As RectangleF, c1 As Color, c2 As Color, angle As Single, isAngleScalable = False As Boolean)
+		Brush(CreateLineBrushFromRectWithAngle(rc, c1, c2, angle, isAngleScalable) As *GpBrush)
+	End Sub
+
+	Static Function CreateLineBrush(ByRef pt1 As Point, ByRef pt2 As Point, c1 As ARGB, c2 As ARGB) As *GpLineGradient
+		SetStatus(GdipCreateLineBrushI(pt1, pt2, c1, c2, WrapMode.Tile, CreateLineBrush))
+	End Function
+
+	Static Function CreateLineBrush(ByRef pt1 As PointF, ByRef pt2 As PointF, c1 As ARGB, c2 As ARGB) As *GpLineGradient
+		SetStatus(GdipCreateLineBrush(pt1, pt2, c1, c2, WrapMode.Tile, CreateLineBrush))
+	End Function
+
+	Static Function CreateLineBrushFromRect(ByRef rc As Rectangle, c1 As ARGB, c2 As ARGB, mode As LinearGradientMode) As *GpLineGradient
+		SetStatus(GdipCreateLineBrushFromRectI(rc, c1, c2, mode, 0 /*WrapMode.Tile*/, CreateLineBrushFromRect))
+	End Function
+
+	Static Function CreateLineBrushFromRect(ByRef rc As RectangleF, c1 As ARGB, c2 As ARGB, mode As LinearGradientMode) As *GpLineGradient
+		SetStatus(GdipCreateLineBrushFromRect(rc, c1, c2, mode, 0 /*WrapMode.Tile*/, CreateLineBrushFromRect))
+	End Function
+
+	Static Function CreateLineBrushFromRectWithAngle(ByRef rc As Rectangle, c1 As ARGB, c2 As ARGB, angle As Single, isAngleScalable As Boolean) As *GpLineGradient
+		SetStatus(GdipCreateLineBrushFromRectWithAngleI(rc, c1, c2, angle, isAngleScalable, 0 /*WrapMode.Tile*/ , CreateLineBrushFromRectWithAngle))
+	End Function
+
+	Static Function CreateLineBrushFromRectWithAngle(ByRef rc As RectangleF, c1 As ARGB, c2 As ARGB, angle As Single, isAngleScalable As Boolean) As *GpLineGradient
+		SetStatus(GdipCreateLineBrushFromRectWithAngle(rc, c1, c2, angle, isAngleScalable, 0 /*WrapMode.Tile*/, CreateLineBrushFromRectWithAngle))
+	End Function
+
+	'LinearColors - GdipGetLineColors/GdipSetLineColors
+
+	Function Rectangle() As RectangleF
+		SetStatus(GdipGetLineRect(nativeBrush As *GpLineGradient, Rectangle))
+	End Function
+
+	Sub GammaCorrection(gammaCorrection As Boolean)
+		SetStatus(GdipSetLineGammaCorrection(nativeBrush As *GpLineGradient, gammaCorrection))
+	End Sub
+	
+	Function GammaCorrection() As Boolean
+		Dim gammaCorrection As BOOL
+		SetStatus(GdipGetLineGammaCorrection(nativeBrush As *GpLineGradient, gammaCorrection))
+		GammaCorrection = gammaCorrection As Boolean
+	End Function
+
+	'Blend - GdipGetLineBlend/GdipSetLineBlend
+	'InterpolationColors - GdipGetLinePresetBlend/GdipSetLinePresetBlend
+
+	Sub SetBlendBellShape(focus As Single, scale = 1.0 As Single)
+		SetStatus(GdipSetLineSigmaBlend(nativeBrush As *GpLineGradient, focus, scale))
+	End Sub
+
+	Sub SetBlendTriangularShape(focus As Single, scale = 1.0 As Single)
+		SetStatus(GdipSetLineLinearBlend(nativeBrush As *GpLineGradient, focus, scale))
+	End Sub
+
+	Sub Transform(matrix As Matrix)
+		SetStatus(GdipSetLineTransform(nativeBrush As *GpLineGradient, matrix.NativeMatrix))
+	End Sub
+
+	Function Transform() As Matrix
+		Dim matrix As *GpMatrix
+		SetStatus(GdipGetLineTransform(nativeBrush As *GpLineGradient, matrix))
+		Transform = New Matrix(matrix)
+	End Function
+
+	Sub ResetTransform()
+		SetStatus(GdipResetLineTransform(nativeBrush As *GpLineGradient))
+	End Sub
+
+	Sub MultiplyTransform(matrix As Drawing2D.Matrix, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipMultiplyLineTransform(nativeBrush As *GpLineGradient, matrix.NativeMatrix, order))
+	End Sub
+
+	Sub TranslateTransform(dx As Single, dy As Single, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipTranslateLineTransform(nativeBrush As *GpLineGradient, dx, dy, order))
+	End Sub
+
+	Sub ScaleTransform(sx As Single, sy As Single, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipScaleLineTransform(nativeBrush As *GpLineGradient, sx, sy, order))
+	End Sub
+
+	Sub RotateTransform(angle As Single, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipRotateLineTransform(nativeBrush As *GpLineGradient, angle, order))
+	End Sub
+
+	Sub WrapMode(wrapMode As WrapMode)
+		SetStatus(GdipSetLineWrapMode(nativeBrush As *GpLineGradient, wrapMode))
+	End Sub
+/*
+	Function WrapMode() As WrapMode
+		SetStatus(GdipGetLineWrapMode(nativeBrush As *GpLineGradient, WrapMode))
+	End Function
+*/
+End Class
+
+Class PathGradientBrush
+	Inherits Brush
+Public
+	Sub PathGradientBrush(points As *PointF, count As Long, wrapMode /*= WrapMode.Clamp*/ As WrapMode)
+		Brush(CreatePathGradient(points, count, wrapMode))
+	End Sub
+
+	Sub PathGradientBrush(points As *Point, count As Long, wrapMode /*= WrapMode.Clamp*/ As WrapMode)
+		Brush(CreatePathGradientI(points, count, wrapMode))
+	End Sub
+
+	Sub PathGradientBrush(path As GraphicsPath)
+		Brush(CreatePathGradientFromPath(path.NativePath As *GpBrush))
+	End Sub
+
+	Sub CenterColor(c As Color)
+		SetStatus(GdipSetPathGradientCenterColor(nativeBrush As *GpPathGradient, c))
+	End Sub
+	
+	Function CenterColor() As Color
+		SetStatus(GdipGetPathGradientCenterColor(nativeBrush As *GpPathGradient, CenterColor))
+	End Function
+
+	'SurroundColors - GdipGetPathGradientSurroundColorsWithCount/GdipSetPathGradientSurroundColorsWithCount/GdipGetPathGradientSurroundColorCount
+
+	Sub GraphicsPath(path As GraphicsPath)
+		If ActiveBasic.IsNothing(path) Then
+			Throw New System.ArgumentNullException("path")
+		End If
+		SetStatus(GdipSetPathGradientPath(nativeBrush As *GpPathGradient, path.NativePath))
+	End Sub
+	
+	Function GraphicsPath() As GraphicsPath
+		Dim path As *GpPath
+		SetStatus(GdipGetPathGradientPath(nativeBrush As *GpPathGradient, path))
+		GraphicsPath = New GraphicsPath(path)
+	End Function
+
+	Sub CenterPoint(ByRef pt As PointF)
+		SetStatus(GdipSetPathGradientCenterPoint(nativeBrush As *GpPathGradient, pt))
+	End Sub
+	
+	Function CenterPoint() As PointF
+		SetStatus(GdipSetPathGradientCenterPoint(nativeBrush As *GpPathGradient, CenterPoint))
+	End Function
+
+	Function Rectangle() As RectangleF
+		SetStatus(GdipGetPathGradientRect(nativeBrush As *GpPathGradient, Rectangle))
+	End Function
+
+	Sub GammaCorrection(gammaCorrection As Boolean)
+		SetStatus(GdipSetPathGradientGammaCorrection(nativeBrush As *GpPathGradient, gammaCorrection))
+	End Sub
+	
+	Function GammaCorrection() As Boolean
+		Dim gammaCorrection As BOOL
+		SetStatus(GdipGetPathGradientGammaCorrection(nativeBrush As *GpPathGradient, gammaCorrection))
+		GammaCorrection = gammaCorrection As Boolean
+	End Function
+
+	' Blend - GdipGetPathGradientBlend/GdipSetPathGradientBlend/GdipGetPathGradientBlendCount
+	' InterpolationColors - GdipGetPathGradientPresetBlend/GdipSetPathGradientPresetBlend/GdipGetPathGradientPresetBlendCount
+ 
+	Sub SetBlendBellShape(focus As Single, scale = 1.0 As Single)
+		SetStatus(GdipSetPathGradientSigmaBlend(nativeBrush As *GpPathGradient, focus, scale))
+	End Sub
+
+	Sub SetBlendTriangularShape(focus As Single, scale = 1.0 As Single)
+		SetStatus(GdipSetPathGradientLinearBlend(nativeBrush As *GpPathGradient, focus, scale))
+	End Sub
+
+	Sub Transform(matrix As Matrix)
+		SetStatus(GdipSetPathGradientTransform(nativeBrush As *GpPathGradient, matrix.NativeMatrix))
+	End Sub
+
+	Function Transform() As Matrix
+		Dim matrix As *GpMatrix
+		SetStatus(GdipGetPathGradientTransform(nativeBrush As *GpPathGradient, matrix))
+		Transform = New Matrix(matrix)
+	End Function
+
+	Sub ResetTransform()
+		SetStatus(GdipResetPathGradientTransform(nativeBrush As *GpPathGradient))
+	End Sub
+
+	Sub MultiplyTransform(matrix As Drawing2D.Matrix, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipMultiplyPathGradientTransform(nativeBrush As *GpPathGradient, matrix.NativeMatrix, order))
+	End Sub
+
+	Sub TranslateTransform(dx As Single, dy As Single, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipTranslatePathGradientTransform(nativeBrush As *GpPathGradient, dx, dy, order))
+	End Sub
+
+	Sub ScaleTransform(sx As Single, sy As Single, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipScalePathGradientTransform(nativeBrush As *GpPathGradient, sx, sy, order))
+	End Sub
+
+	Sub RotateTransform(angle As Single, order /*= MatrixOrder.Prepend*/ As MatrixOrder)
+		SetStatus(GdipRotatePathGradientTransform(nativeBrush As *GpPathGradient, angle, order))
+	End Sub
+
+	Function FocusScales() As PointF
+		SetStatus(GdipGetPathGradientFocusScales(nativeBrush As *GpPathGradient, FocusScales.X, FocusScales.Y))
+	End Function
+
+	Sub FocusScales(scale As PointF)
+		SetStatus(GdipSetPathGradientFocusScales(nativeBrush As *GpPathGradient, scale.X, scale.Y))
+	End Sub
+
+	Sub WrapMode(wrapMode As WrapMode)
+		SetStatus(GdipSetPathGradientWrapMode(nativeBrush As *GpPathGradient, wrapMode))
+	End Sub
+/*
+	Function WrapMode() As WrapMode
+		SetStatus(GdipGetPathGradientWrapMode(nativeBrush As *GpPathGradient, WrapMode))
+	End Function
+*/
+Private
+	Static Function CreatePathGradient(points As *PointF, count As Long, wrapMode As WrapMode) As *GpPathGradient
+		SetStatus(GdipCreatePathGradient(points, count, wrapMode, CreatePathGradient))
+	End Function
+
+	Static Function CreatePathGradientI(points As *Point, count As Long, wrapMode As WrapMode) As *GpPathGradient
+		SetStatus(GdipCreatePathGradientI(points, count, wrapMode, CreatePathGradientI))
+	End Function
+
+	Static Function CreatePathGradientFromPath(path As *GpPath) As *GpPathGradient
+		SetStatus(GdipCreatePathGradientFromPath(path, CreatePathGradientFromPath))
+	End Function
+End Class
+
+End Namespace
+
+End Namespace
+End Namespace
Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/Font.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/Font.ab	(revision 700)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/Font.ab	(revision 701)
@@ -283,8 +283,9 @@
 		nativeFont = 0
 		Dim family = Nothing As FontFamily
-		Dim nativeFamily = family.NativeFamily
+		Dim nativeFamily As *GpFontFamily
 
 		Try
 			family = New FontFamily(familyName, fontCollection)
+			nativeFamily = family.NativeFamily
 		Catch e As Exception
 			nativeFamily = FontFamily.GenericSansSerif().NativeFamily
@@ -292,5 +293,5 @@
 
 		Try
-			SetStatus(GdipCreateFont(nativeFamily, emSize, style, unit, nativeFont))
+			SetStatus(GdipCreateFont(nativeFamily, emSize, style, unit As Long, nativeFont))
 		Catch e As Exception
 			nativeFamily = FontFamily.GenericSansSerif().NativeFamily
Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/Graphics.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/Graphics.ab	(revision 700)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/Graphics.ab	(revision 701)
@@ -4,16 +4,4 @@
 Namespace Drawing
 
-Class Brush
-Public
-	nativeBrush As *GpBrush
-End Class
-Class StringFormat
-Public
-	nativeFormat As *GpStringFormat	
-End Class
-Class Image
-Public
-	nativeImage As *GpImage
-End Class
 Class ImageAttributes
 Public
@@ -29,4 +17,9 @@
 Class GraphicsPath
 Public
+	Sub GraphicsPath(native As *GpPath)
+		nativePath = native
+	End Sub
+	Function NativePath() As *GpPath
+	End Function
 	nativePath As *GpPath
 End Class
@@ -508,9 +501,9 @@
 
 	Sub FillRectangle(brush As Brush, x As Single, y As Single, width As Single, height As Single)
-		SetStatus(GdipFillRectangle(nativeGraphics, brush.nativeBrush, x, y, width, height))
+		SetStatus(GdipFillRectangle(nativeGraphics, brush.NativeBrush, x, y, width, height))
 	End Sub
 
 	Sub FillRectangles(brush As Brush, rects As *RectangleF, count As Long)
-		SetStatus(GdipFillRectangles(nativeGraphics,brush.nativeBrush,rects, count))
+		SetStatus(GdipFillRectangles(nativeGraphics,brush.NativeBrush,rects, count))
 	End Sub
 
@@ -520,9 +513,9 @@
 
 	Sub FillRectangle(brush As Brush, x As Long, y As Long, width As Long, height As Long)
-		SetStatus(GdipFillRectangleI(nativeGraphics, brush.nativeBrush, x, y, width, height))
+		SetStatus(GdipFillRectangleI(nativeGraphics, brush.NativeBrush, x, y, width, height))
 	End Sub
 
 	Sub FillRectangles(brush As Brush, rects As *Rectangle, count As Long)
-		SetStatus(GdipFillRectanglesI(nativeGraphics, brush.nativeBrush, rects, count))
+		SetStatus(GdipFillRectanglesI(nativeGraphics, brush.NativeBrush, rects, count))
 	End Sub
 
@@ -532,5 +525,5 @@
 
 	Sub FillPolygon(brush As Brush, points As *PointF, count As Long, fillMode As Drawing2D.FillMode)
-		SetStatus(GdipFillPolygon(nativeGraphics, brush.nativeBrush, points, count, fillMode))
+		SetStatus(GdipFillPolygon(nativeGraphics, brush.NativeBrush, points, count, fillMode))
 	End Sub
 
@@ -540,5 +533,5 @@
 
 	Sub FillPolygon(brush As Brush, points As *Point, count As Long, fillMode As Drawing2D.FillMode)
-		SetStatus(GdipFillPolygonI(nativeGraphics, brush.nativeBrush, points, count, fillMode))
+		SetStatus(GdipFillPolygonI(nativeGraphics, brush.NativeBrush, points, count, fillMode))
 	End Sub
 
@@ -548,5 +541,5 @@
 
 	Sub FillEllipse(brush As Brush, x As Single, y As Single, width As Single, height As Single)
-		SetStatus(GdipFillEllipse(nativeGraphics, brush.nativeBrush, x, y, width, height))
+		SetStatus(GdipFillEllipse(nativeGraphics, brush.NativeBrush, x, y, width, height))
 	End Sub
 
@@ -556,5 +549,5 @@
 
 	Sub FillEllipse(brush As Brush, x As Long, y As Long, width As Long, height As Long)
-		SetStatus(GdipFillEllipseI(nativeGraphics, brush.nativeBrush, x, y, width, height))
+		SetStatus(GdipFillEllipseI(nativeGraphics, brush.NativeBrush, x, y, width, height))
 	End Sub
 
@@ -564,5 +557,5 @@
 
 	Sub FillPie(brush As Brush, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single)
-		SetStatus(GdipFillPie(nativeGraphics, brush.nativeBrush, x, y, width, height, startAngle, sweepAngle))
+		SetStatus(GdipFillPie(nativeGraphics, brush.NativeBrush, x, y, width, height, startAngle, sweepAngle))
 	End Sub
 
@@ -572,5 +565,5 @@
 
 	Sub FillPie(brush As Brush, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single)
-		SetStatus(GdipFillPieI(nativeGraphics, brush.nativeBrush, x, y, width, height, startAngle, sweepAngle))
+		SetStatus(GdipFillPieI(nativeGraphics, brush.NativeBrush, x, y, width, height, startAngle, sweepAngle))
 	End Sub
 
@@ -579,33 +572,33 @@
 			Throw New ArgumentNullException("brush or path or both")
 		End If
-		SetStatus(GdipFillPath(nativeGraphics, brush.nativeBrush, path.nativePath))
+		SetStatus(GdipFillPath(nativeGraphics, brush.NativeBrush, path.nativePath))
 	End Sub
 
 	Sub FillClosedCurve(brush As Brush, points As *PointF, count As Long)
-		SetStatus(GdipFillClosedCurve(nativeGraphics, brush.nativeBrush, points, count))
+		SetStatus(GdipFillClosedCurve(nativeGraphics, brush.NativeBrush, points, count))
 	End Sub
 
 	Sub FillClosedCurve(brush As Brush, points As *PointF, count As Long, fillMode As Drawing2D.FillMode)
-		SetStatus(GdipFillClosedCurve2(nativeGraphics, brush.nativeBrush, points, count, 0.5, fillMode))
+		SetStatus(GdipFillClosedCurve2(nativeGraphics, brush.NativeBrush, points, count, 0.5, fillMode))
 	End Sub
 
 	Sub FillClosedCurve(brush As Brush, points As *PointF, count As Long, fillMode As Drawing2D.FillMode, tension As Single)
-		SetStatus(GdipFillClosedCurve2(nativeGraphics, brush.nativeBrush, points, count, tension, fillMode))
+		SetStatus(GdipFillClosedCurve2(nativeGraphics, brush.NativeBrush, points, count, tension, fillMode))
 	End Sub
 
 	Sub FillClosedCurve(brush As Brush, points As *Point, count As Long)
-		SetStatus(GdipFillClosedCurveI(nativeGraphics, brush.nativeBrush, points, count))
+		SetStatus(GdipFillClosedCurveI(nativeGraphics, brush.NativeBrush, points, count))
 	End Sub
 
 	Sub FillClosedCurve(brush As Brush, points As *Point, count As Long, fillMode As Drawing2D.FillMode)
-		SetStatus(GdipFillClosedCurve2I(nativeGraphics, brush.nativeBrush, points, count, 0.5, fillMode))
+		SetStatus(GdipFillClosedCurve2I(nativeGraphics, brush.NativeBrush, points, count, 0.5, fillMode))
 	End Sub
 
 	Sub FillClosedCurve(brush As Brush, points As *Point, count As Long, fillMode As Drawing2D.FillMode, tension As Single)
-		SetStatus(GdipFillClosedCurve2I(nativeGraphics, brush.nativeBrush, points, count, tension, fillMode))
+		SetStatus(GdipFillClosedCurve2I(nativeGraphics, brush.NativeBrush, points, count, tension, fillMode))
 	End Sub
 
 	Sub FillRegion(brush As Brush, region As Region)
-		SetStatus(GdipFillRegion(nativeGraphics, brush.nativeBrush, region.nativeRegion))
+		SetStatus(GdipFillRegion(nativeGraphics, brush.NativeBrush, region.nativeRegion))
 	End Sub
 
@@ -629,5 +622,5 @@
 	Sub DrawString(str As PCWSTR, length As Long, font As Font, brush As Brush, ByRef layoutRect As RectangleF, stringFormat = Nothing As StringFormat)
 		Dim nativeFont = getNativeFont(font)
-		Dim nativeFormat = getNativeStringFormat(stringFormat)
+		Dim nativeFormat = GetNativeStringFormat(stringFormat)
 		Dim nativeBrush = getNativeBrush(brush)
 		SetStatus(GdipDrawString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, nativeBrush))
@@ -739,5 +732,5 @@
 	Function measureString(str As PCWSTR, length As Long, font As Font, ByRef layoutRect As RectangleF, stringFormat As StringFormat, codepointsFitted As *Long, linesFilled As *Long) As SizeF
 		Dim nativeFont = getNativeFont(font)
-		Dim nativeFormat = getNativeStringFormat(stringFormat)
+		Dim nativeFormat = GetNativeStringFormat(stringFormat)
 		Dim boundingBox As RectangleF
 		SetStatus(GdipMeasureString(nativeGraphics, str, length, nativeFont, layoutRect, nativeFormat, boundingBox, codepointsFitted, linesFilled))
@@ -759,5 +752,5 @@
 		End If
 		Dim count As Long
-        SetStatus(GdipGetStringFormatMeasurableCharacterRangeCount(stringFormat.nativeFormat, count))
+        SetStatus(GdipGetStringFormatMeasurableCharacterRangeCount(stringFormat.NativeFormat, count))
 		Dim nativeRegions As **GpRegion 'ここで = GC_mallocとすると、エラーになる。
 		nativeRegions = GC_malloc(count * SizeOf(*GpRegion))
@@ -771,5 +764,5 @@
 		Next
 		Dim nativeFont = getNativeFont(font)
-		SetStatus(GdipMeasureCharacterRanges(nativeGraphics, str, length, nativeFont, layoutRect, stringFormat.nativeFormat, count, nativeRegions))
+		SetStatus(GdipMeasureCharacterRanges(nativeGraphics, str, length, nativeFont, layoutRect, stringFormat.NativeFormat, count, nativeRegions))
 	End Function
 
@@ -1224,17 +1217,9 @@
 	End Function
 
-	Static Function getNativeStringFormat(sf As StringFormat) As *GpStringFormat
-		If ActiveBasic.IsNothing(sf) Then
-			getNativeStringFormat = 0
-		Else
-			getNativeStringFormat = sf.nativeFormat
-		End If
-	End Function
-
 	Static Function getNativeBrush(br As Brush) As *GpBrush
 		If ActiveBasic.IsNothing(br) Then
 			getNativeBrush = 0
 		Else
-			getNativeBrush = br.nativeBrush
+			getNativeBrush = br.NativeBrush
 		End If
 	End Function
Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/Image.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/Image.ab	(revision 700)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/Image.ab	(revision 701)
@@ -6,8 +6,12 @@
 Class Image
 Public
+	Sub Image(native As *GpImage)
+		nativeImage = native
+	End Sub
+
 	Function NativeImage() As *GpImage
 		Return nativeImage
 	End Function
-Private
+'Private
 	nativeImage As *GpImage
 End Class
Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/Pen.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/Pen.ab	(revision 700)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/Pen.ab	(revision 701)
@@ -27,5 +27,5 @@
 			Throw New ArgumentNullException("brush")
 		End If
-		SetStatus(GdipCreatePen2(brush.nativeBrush, width, 0 /*GraphicsUnit.World As GpUnit*/, nativePen))
+		SetStatus(GdipCreatePen2(brush.NativeBrush, width, 0 /*GraphicsUnit.World As GpUnit*/, nativePen))
 	End Sub
 
@@ -268,5 +268,5 @@
 			getNativeBrush = 0
 		Else
-			getNativeBrush = br.nativeBrush
+			getNativeBrush = br.NativeBrush
 		End If
 	End Function
Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/StringFormat.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/StringFormat.ab	(revision 701)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/StringFormat.ab	(revision 701)
@@ -0,0 +1,128 @@
+' Classes/System/Drawing/StringFormat.ab
+
+Namespace System
+Namespace Drawing
+
+Function GetNativeStringFormat(sf As StringFormat) As *GpStringFormat
+	If ActiveBasic.IsNothing(sf) Then
+		GetNativeStringFormat = 0
+	Else
+		GetNativeStringFormat = sf.NativeFormat
+	End If
+End Function
+
+Class StringFormat
+	Implements IDisposable, ICloneable
+Public
+	Sub StringFormat(native As *GpStringFormat)
+		nativeFormat = native
+	End Sub
+
+	Sub StringFormat() '暫定
+		SetStatus(GdipCreateStringFormat(0, LANG_NEUTRAL, nativeFormat))
+	End Sub
+
+	Sub StringFormat(formatFlags /*= 0*/ As StringFormatFlags, language = LANG_NEUTRAL As LANGID)
+		SetStatus(GdipCreateStringFormat(formatFlags, language, nativeFormat))
+	End Sub
+
+	Sub StringFormat(format As StringFormat)
+		SetStatus(GdipCloneStringFormat(GetNativeStringFormat(format), nativeFormat))
+	End Sub
+
+	Static Function GenericDefault() As StringFormat
+		Dim native As *GpStringFormat
+		SetStatus(GdipStringFormatGetGenericTypographic(native))
+		GenericDefault = New StringFormat(native)
+	End Function
+
+	Static Function GenericTypographic() As StringFormat
+		Dim native As *GpStringFormat
+		SetStatus(GdipStringFormatGetGenericTypographic(native))
+		GenericTypographic = New StringFormat(native)
+	End Function
+
+	Function Clone() As StringFormat
+		Dim clonedStringFormat As *GpStringFormat
+		SetStatus(GdipCloneStringFormat(nativeFormat, clonedStringFormat))
+		Clone = New StringFormat(clonedStringFormat)
+	End Function
+
+	Sub Dispose()
+		GdipDeleteStringFormat(nativeFormat)
+		nativeFormat = 0
+	End Sub
+
+	Sub ~StringFormat()
+		Dispose()
+	End Sub
+
+	Sub FormatFlags(align As StringFormatFlags)
+		SetStatus(GdipSetStringFormatFlags(nativeFormat, align))
+	End Sub
+/*
+	Function FormatFlags() As StringFormatFlags
+		Dim flags As Long
+		SetStatus(GdipGetStringFormatFlags(nativeFormat, flags))
+		FormatFlags = flags As StringFormatFlags
+	End Function
+*/
+	Sub Alignment(align As StringAlignment)
+		SetStatus(GdipSetStringFormatAlign(nativeFormat, align))
+	End Sub
+/*
+	Function Alignment() As StringAlignment
+		SetStatus(GdipGetStringFormatAlign(nativeFormat, Alignment))
+	End Function
+*/
+	Sub LineAlignment(align As StringAlignment)
+		SetStatus(GdipSetStringFormatLineAlign(nativeFormat, align))
+	End Sub
+/*
+	Function LineAlignment() As StringAlignment
+		SetStatus(GdipGetStringFormatLineAlign(nativeFormat, LineAlignment))
+	End Function
+*/
+	Sub SetHotkeyPrefix(hotkeyPrefix As Text.HotkeyPrefix)
+		SetStatus(GdipSetStringFormatHotkeyPrefix(nativeFormat, hotkeyPrefix As Long))
+	End Sub
+/*
+	Function HotkeyPrefix() As Text.HotkeyPrefix
+		SetStatus(GdipGetStringFormatHotkeyPrefix(nativeFormat, ByVal hotkeyPrefix As *Long))
+	End Function
+*/
+	'SetTabStops - GdipSetStringFormatTabStops
+	'GetTabStops - GdipGetStringFormatTabStops/GetTabStopCount
+
+	Sub SetDigitSubstitution(language As LANGID, substitute As StringDigitSubstitute)
+		SetStatus(GdipSetStringFormatDigitSubstitution(nativeFormat, language, substitute))
+	End Sub
+
+	Function DigitSubstitutionLanguage() As LANGID
+		SetStatus(GdipGetStringFormatDigitSubstitution(nativeFormat, DigitSubstitutionLanguage, ByVal NULL))
+	End Function
+/*
+	Function DigitSubstitutionMethod() As StringDigitSubstitute
+		SetStatus(GdipGetStringFormatDigitSubstitution(nativeFormat, NULL, DigitSubstitutionMethod))
+	End Function
+*/
+	Sub Trimming(trimming As StringTrimming)
+		SetStatus(GdipSetStringFormatTrimming(nativeFormat, trimming))
+	End Sub
+/*
+	Function Trimming() As StringTrimming
+		SetStatus(GdipGetStringFormatTrimming(nativeFormat, StringTrimming))
+	End Function
+*/
+	' SetMeasurableCharacterRanges - GdipSetStringFormatMeasurableCharacterRanges
+
+	Function NativeFormat() As *GpStringFormat
+		NativeFormat = nativeFormat
+	End Function
+
+Private
+	nativeFormat As *GpStringFormat
+End Class
+
+End Namespace
+End Namespace
Index: trunk/ab5.0/ablib/src/Classes/System/Drawing/misc.ab
===================================================================
--- trunk/ab5.0/ablib/src/Classes/System/Drawing/misc.ab	(revision 700)
+++ trunk/ab5.0/ablib/src/Classes/System/Drawing/misc.ab	(revision 701)
@@ -27,11 +27,11 @@
 
 Enum GraphicsUnit
-	World       ' 0
-	Display     ' 1
-	Pixel       ' 2
-	Point       ' 3
-	Inch        ' 4
-	Document    ' 5
-	Millimeter  ' 6
+	World = 0
+	Display = 1
+	Pixel = 2
+	Point = 3
+	Inch = 4
+	Document = 5
+	Millimeter = 6
 End Enum
 
