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
