\r
namespace System.Drawing.Drawing2D\r
{\r
- public sealed class Matrix : MarshalByRefObject, IDisposable\r
+ public sealed class Matrix : MarshalByRefObject, IDisposable\r
{\r
internal IntPtr nativeMatrix;\r
\r
\r
public Matrix (Rectangle rect , Point[] plgpts)\r
{\r
- GpRect rectangle = new GpRect (rect);\r
-\r
- GDIPlus.GdipCreateMatrix3I (rectangle, plgpts, out nativeMatrix);\r
+ GDIPlus.GdipCreateMatrix3I (rect, plgpts, out nativeMatrix);\r
}\r
\r
public Matrix (RectangleF rect , PointF[] pa)\r
{\r
- GpRectF rectangle = new GpRectF (rect);\r
-\r
- GDIPlus.GdipCreateMatrix3 (rectangle, pa, out nativeMatrix);\r
+ GDIPlus.GdipCreateMatrix3 (rect, pa, out nativeMatrix);\r
}\r
\r
public Matrix (float m11, float m12, float m21, float m22, float dx, float dy)\r
// properties\r
public float[] Elements {\r
get {\r
- IntPtr tmp = Marshal.AllocHGlobal (8 * 6);\r
+ IntPtr tmp = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (float)) * 6);\r
+ float [] retval = new float [6];\r
\r
Status s = GDIPlus.GdipGetMatrixElements (nativeMatrix, tmp);\r
\r
- float [] retval = new float [6];\r
-\r
Marshal.Copy (tmp, retval, 0, 6);\r
\r
Marshal.FreeHGlobal (tmp);\r