diff dwt/internal/gdip/Gdip.d @ 213:36f5cb12e1a2

Update to SWT 3.4M7
author Frank Benoit <benoit@tionex.de>
date Sat, 17 May 2008 17:34:28 +0200
parents f575eec94970
children fbb9174f2a2c
line wrap: on
line diff
--- a/dwt/internal/gdip/Gdip.d	Mon May 05 00:12:38 2008 +0200
+++ b/dwt/internal/gdip/Gdip.d	Sat May 17 17:34:28 2008 +0200
@@ -791,13 +791,13 @@
 	**************************************************************************/
 
 	static Status LinearGradientBrush_SetInterpolationColors( LinearGradientBrush brush,
-							  ARGB[] presetColors, float[] blendPositions, int count )
+							  ARGB* presetColors, float* blendPositions, int count )
 	{
 		if ((count <= 0) || presetColors is null)
             return SetStatus(Status.InvalidParameter);
 
-		return SetStatus(GdipSetLinePresetBlend(brush, presetColors.ptr,
-													   blendPositions.ptr,
+		return SetStatus(GdipSetLinePresetBlend(brush, presetColors,
+													   blendPositions,
 													   count ) );
 	}
 
@@ -1004,9 +1004,9 @@
 
 	**************************************************************************/
 
-	static Status Pen_SetDashPattern( Pen pen, float[] dashArray, int count )
+	static Status Pen_SetDashPattern( Pen pen, float* dashArray, int count )
 	{
-		return SetStatus(GdipSetPenDashArray(pen, dashArray.ptr, count));
+		return SetStatus(GdipSetPenDashArray(pen, dashArray, count));
 	}
 
 	/**************************************************************************
@@ -1276,11 +1276,11 @@
 
 	**************************************************************************/
 
-	static Path GraphicsPath_new( Point[] points, ubyte[] types, int count,
+	static Path GraphicsPath_new( Point* points, ubyte* types, int count,
 								  FillMode fillMode = FillModeAlternate )
 	{
         Path path = null;
-        lastResult = GdipCreatePath2I(points.ptr, types.ptr, count, fillMode, path);
+        lastResult = GdipCreatePath2I(points, types, count, fillMode, path);
 		return path;
 	}
 
@@ -1292,6 +1292,11 @@
 	{
 		GdipDeletePath(path);
 	}
+    static Path GraphicsPath_Clone( Handle path ){
+        Path clonepath = null;
+        SetStatus( GdipClonePath(path, clonepath));
+        return clonepath;
+    }
 
 
 	static Status GraphicsPath_AddArcF( Path path, float x,     float y,
@@ -1427,18 +1432,18 @@
 
 	**************************************************************************/
 
-	static Status GraphicsPath_GetPathTypes( Path path, byte[] types, int count )
+	static Status GraphicsPath_GetPathTypes( Path path, byte* types, int count )
 	{
-		return SetStatus( GdipGetPathTypes( path, types.ptr, count) );
+		return SetStatus( GdipGetPathTypes( path, types, count) );
 	}
 
 	/**************************************************************************
 
 	**************************************************************************/
 
-	static Status GraphicsPath_GetPathPoints( Path path, PointF[] points, int count)
+	static Status GraphicsPath_GetPathPoints( Path path, PointF* points, int count)
     {
-        return SetStatus(GdipGetPathPoints(path, points.ptr, count));
+        return SetStatus(GdipGetPathPoints(path, points, count));
     }
 
 
@@ -1605,9 +1610,9 @@
 
 	**************************************************************************/
 
-	static Status Graphics_DrawLines( Graphics graphics, Pen pen, Point[] points, uint count )
+	static Status Graphics_DrawLines( Graphics graphics, Pen pen, Point* points, uint count )
 	{
-		return SetStatus(GdipDrawLinesI(graphics, pen, points.ptr, count));
+		return SetStatus(GdipDrawLinesI(graphics, pen, points, count));
 	}
 
 	/**************************************************************************
@@ -1623,9 +1628,9 @@
 
 	**************************************************************************/
 
-	static Status Graphics_DrawPolygon(Graphics graphics, Pen pen, Point[] points, uint count )
+	static Status Graphics_DrawPolygon(Graphics graphics, Pen pen, Point* points, uint count )
 	{
-		return SetStatus(GdipDrawPolygonI(graphics, pen, points.ptr, count));
+		return SetStatus(GdipDrawPolygonI(graphics, pen, points, count));
 
 	}
 
@@ -1712,9 +1717,9 @@
 	**************************************************************************/
 
 	static Status Graphics_FillPolygon( Graphics graphics, Brush brush,
-										Point[] points, int count, FillMode fillMode )
+										Point* points, int count, FillMode fillMode )
 	{
-		return SetStatus(GdipFillPolygonI(graphics, brush, points.ptr, count, fillMode));
+		return SetStatus(GdipFillPolygonI(graphics, brush, points, count, fillMode));
 	}
 
 	/**************************************************************************
@@ -1938,7 +1943,7 @@
 
 	**************************************************************************/
 
-	static Status Graphics_SetClip( Graphics graphics, Path path,
+	static Status Graphics_SetClipPath( Graphics graphics, Path path,
 								    CombineMode combineMode = CombineModeReplace )
 	{
 		return SetStatus(GdipSetClipPath(graphics, path, combineMode));
@@ -1957,6 +1962,9 @@
                                                       combineMode));
 	}
 
+    //static Status Graphics_SetClipPath(Graphics graphics, GraphicsPath path ){
+    //    return SetStatus( SetClipPath( graphics, path ));
+    //}
 	/**************************************************************************
 
 	**************************************************************************/
@@ -2125,9 +2133,9 @@
 
 	**************************************************************************/
 
-    static Status Matrix_GetElements( Matrix matrix, float[] m )
+    static Status Matrix_GetElements( Matrix matrix, float* m )
 	{
-		return SetStatus( GdipGetMatrixElements( matrix, m.ptr ) );
+		return SetStatus( GdipGetMatrixElements( matrix, m ) );
 	}
 
 	/**************************************************************************
@@ -2180,6 +2188,9 @@
 	{
 		return SetStatus( GdipScaleMatrix(matrix, scaleX, scaleY, order) );
 	}
+    static Status Matrix_Shear( Matrix matrix, float shearX, float shearY, MatrixOrder order ){
+        return SetStatus( GdipShearMatrix(matrix, shearX, shearY, order));
+    }
 
 	/**************************************************************************
 
@@ -2196,9 +2207,9 @@
 
 	**************************************************************************/
 
-    static Status Matrix_TransformPoints( Matrix matrix, PointF[] pts, int count = 1 )
+    static Status Matrix_TransformPoints( Matrix matrix, PointF* pts, int count = 1 )
 	{
-		return SetStatus( GdipTransformMatrixPoints( matrix, pts.ptr, count ) );
+		return SetStatus( GdipTransformMatrixPoints( matrix, pts, count ) );
 	}
 
 	/**************************************************************************
@@ -2310,10 +2321,10 @@
 	**************************************************************************/
 
 	static int StringFormat_SetTabStops( StringFormat format, float firstTabOffset,
-										 int count, float[] tabStops)
+										 int count, float* tabStops)
 	{
 		return SetStatus( GdipSetStringFormatTabStops( format, firstTabOffset,
-													   count, tabStops.ptr ) );
+													   count, tabStops ) );
 	}
 
 	/**************************************************************************