[System.Drawing] Rename method parameters to match .NET contract
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 15 Mar 2017 16:21:16 +0000 (17:21 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 16 Mar 2017 12:02:09 +0000 (13:02 +0100)
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs
mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs
mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs
mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs
mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs
mcs/class/System.Drawing/System.Drawing/Graphics.cs

index 191fc387f4c09627c7c87e73102ee2a057ffef01..dc747fdfb588a297efdc715fa96d313f22c7c209 100644 (file)
@@ -221,27 +221,27 @@ namespace System.Drawing.Drawing2D
                 //
                 // AddArc
                 //
-                public void AddArc (Rectangle rect, float start_angle, float sweep_angle)
+                public void AddArc (Rectangle rect, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddArc (RectangleF rect, float start_angle, float sweep_angle)
+                public void AddArc (RectangleF rect, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddArc (int x, int y, int width, int height, float start_angle, float sweep_angle)
+                public void AddArc (int x, int y, int width, int height, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddArc (float x, float y, float width, float height, float start_angle, float sweep_angle)
+                public void AddArc (float x, float y, float width, float height, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
@@ -279,28 +279,28 @@ namespace System.Drawing.Drawing2D
                 //
                 // AddBeziers
                 //
-                public void AddBeziers (params Point [] pts)
+                public void AddBeziers (params Point [] points)
                 {
-                       if (pts == null)
-                               throw new ArgumentNullException ("pts");
-                        Status status = GDIPlus.GdipAddPathBeziersI (nativePath, pts, pts.Length);
+                       if (points == null)
+                               throw new ArgumentNullException ("points");
+                        Status status = GDIPlus.GdipAddPathBeziersI (nativePath, points, points.Length);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddBeziers (PointF [] pts)
+                public void AddBeziers (PointF [] points)
                 {
-                       if (pts == null)
-                               throw new ArgumentNullException ("pts");
-                        Status status = GDIPlus.GdipAddPathBeziers (nativePath, pts, pts.Length);
+                       if (points == null)
+                               throw new ArgumentNullException ("points");
+                        Status status = GDIPlus.GdipAddPathBeziers (nativePath, points, points.Length);
                         GDIPlus.CheckStatus (status);                          
                 }
 
                 //
                 // AddEllipse
                 //
-                public void AddEllipse (RectangleF r)
+                public void AddEllipse (RectangleF rect)
                 {
-                        Status status = GDIPlus.GdipAddPathEllipse (nativePath, r.X, r.Y, r.Width, r.Height);
+                        Status status = GDIPlus.GdipAddPathEllipse (nativePath, rect.X, rect.Y, rect.Width, rect.Height);
                         GDIPlus.CheckStatus (status);                          
                 }
                 
@@ -310,9 +310,9 @@ namespace System.Drawing.Drawing2D
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddEllipse (Rectangle r)
+                public void AddEllipse (Rectangle rect)
                 {
-                        Status status = GDIPlus.GdipAddPathEllipseI (nativePath, r.X, r.Y, r.Width, r.Height);
+                        Status status = GDIPlus.GdipAddPathEllipseI (nativePath, rect.X, rect.Y, rect.Width, rect.Height);
                         GDIPlus.CheckStatus (status);                          
                 }
                 
@@ -326,16 +326,16 @@ namespace System.Drawing.Drawing2D
                 //
                 // AddLine
                 //
-                public void AddLine (Point a, Point b)
+                public void AddLine (Point pt1, Point pt2)
                 {
-                        Status status = GDIPlus.GdipAddPathLineI (nativePath, a.X, a.Y, b.X, b.Y);
+                        Status status = GDIPlus.GdipAddPathLineI (nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddLine (PointF a, PointF b)
+                public void AddLine (PointF pt1, PointF pt2)
                 {
-                        Status status = GDIPlus.GdipAddPathLine (nativePath, a.X, a.Y, b.X,
-                                        b.Y);
+                        Status status = GDIPlus.GdipAddPathLine (nativePath, pt1.X, pt1.Y, pt2.X,
+                                        pt2.Y);
                                         
                        GDIPlus.CheckStatus (status);                                                                  
                 }
index 024e0c2adde5b360738ba020ff676d82efc2d3f0..9c92b91caa54c3059626815c0d889b0d08b6bfd5 100644 (file)
@@ -45,14 +45,14 @@ namespace System.Drawing.Drawing2D
                {
                }
 
-               public HatchBrush (HatchStyle hatchStyle, Color foreColor)
-                                       : this (hatchStyle, foreColor, Color.Black)
+               public HatchBrush (HatchStyle hatchstyle, Color foreColor)
+                                       : this (hatchstyle, foreColor, Color.Black)
                {
                }
 
-               public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
+               public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor)
                {
-                       Status status = GDIPlus.GdipCreateHatchBrush (hatchStyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
+                       Status status = GDIPlus.GdipCreateHatchBrush (hatchstyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
                        GDIPlus.CheckStatus (status);
                }
 
index 3b042cad175e945dbd3b31229f1e5d37beb6b404..515362c99dfd4be37dc34685df791e478bc28f0a 100644 (file)
@@ -77,33 +77,33 @@ namespace System.Drawing.Imaging
                }
 
                [CLSCompliant(false)]
-               public ColorMatrix (float[][] matrix)
+               public ColorMatrix (float[][] newColorMatrix)
                {                       
-                       color00 = matrix [0][0];
-                       color01 = matrix [0][1];
-                       color02 = matrix [0][2];
-                       color03 = matrix [0][3];
-                       color04 = matrix [0][4];
-                       color10 = matrix [1][0];
-                       color11 = matrix [1][1];
-                       color12 = matrix [1][2];
-                       color13 = matrix [1][3];
-                       color14 = matrix [1][4];
-                       color20 = matrix [2][0];
-                       color21 = matrix [2][1];
-                       color22 = matrix [2][2];
-                       color23 = matrix [2][3];
-                       color24 = matrix [2][4];
-                       color30 = matrix [3][0];
-                       color31 = matrix [3][1];
-                       color32 = matrix [3][2];
-                       color33 = matrix [3][3];
-                       color34 = matrix [3][4];
-                       color40 = matrix [4][0];
-                       color41 = matrix [4][1];
-                       color42 = matrix [4][2];
-                       color43 = matrix [4][3];
-                       color44 = matrix [4][4];                                                
+                       color00 = newColorMatrix [0][0];
+                       color01 = newColorMatrix [0][1];
+                       color02 = newColorMatrix [0][2];
+                       color03 = newColorMatrix [0][3];
+                       color04 = newColorMatrix [0][4];
+                       color10 = newColorMatrix [1][0];
+                       color11 = newColorMatrix [1][1];
+                       color12 = newColorMatrix [1][2];
+                       color13 = newColorMatrix [1][3];
+                       color14 = newColorMatrix [1][4];
+                       color20 = newColorMatrix [2][0];
+                       color21 = newColorMatrix [2][1];
+                       color22 = newColorMatrix [2][2];
+                       color23 = newColorMatrix [2][3];
+                       color24 = newColorMatrix [2][4];
+                       color30 = newColorMatrix [3][0];
+                       color31 = newColorMatrix [3][1];
+                       color32 = newColorMatrix [3][2];
+                       color33 = newColorMatrix [3][3];
+                       color34 = newColorMatrix [3][4];
+                       color40 = newColorMatrix [4][0];
+                       color41 = newColorMatrix [4][1];
+                       color42 = newColorMatrix [4][2];
+                       color43 = newColorMatrix [4][3];
+                       color44 = newColorMatrix [4][4];                                                
                }
 
                // properties
index f21831faa49f42af62d3669d57a509e58db0957e..8f19320aac39c78e70b12869b1af47bbc0aa1c5a 100644 (file)
@@ -198,21 +198,21 @@ namespace System.Drawing.Imaging {
                        }
                }
 
-               public EncoderParameter (Encoder encoder, int numberOfValues, int type, int value)
+               public EncoderParameter (Encoder encoder, int NumberOfValues, int Type, int Value)
                {
                        this.encoder = encoder;
-                       this.valuePtr = (IntPtr) value;
-                       this.valuesCount = numberOfValues;
-                       this.type = (EncoderParameterValueType) type;
+                       this.valuePtr = (IntPtr) Value;
+                       this.valuesCount = NumberOfValues;
+                       this.type = (EncoderParameterValueType) Type;
                }
 
-               public EncoderParameter (Encoder encoder, int numerator1, int denominator1, int numerator2, int denominator2)
+               public EncoderParameter (Encoder encoder, int numerator1, int demoninator1, int numerator2, int demoninator2)
                {
                        this.encoder = encoder;
                        this.valuesCount = 1;
                        this.type = EncoderParameterValueType.ValueTypeRationalRange;
                        this.valuePtr = Marshal.AllocHGlobal (4 * 4);
-                       int [] valuearray = { numerator1, denominator1, numerator2, denominator2 };
+                       int [] valuearray = { numerator1, demoninator1, numerator2, demoninator2 };
                        Marshal.Copy (valuearray, 0, this.valuePtr, 4);
                }
 
index 4bf494ea08892e82f78bdc0a2409ae3107edd223..dbbf98d5fa134547418a2258eda7d98283940790 100644 (file)
@@ -160,22 +160,22 @@ namespace System.Drawing.Imaging {
                        SetColorKey (colorLow, colorHigh, ColorAdjustType.Default);
                }
 
-               public void SetColorMatrix (ColorMatrix colorMatrix)
+               public void SetColorMatrix (ColorMatrix newColorMatrix)
                {
-                       SetColorMatrix (colorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
+                       SetColorMatrix (newColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
                }
 
-               public void SetColorMatrix (ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag)
+               public void SetColorMatrix (ColorMatrix newColorMatrix, ColorMatrixFlag flags)
                {
-                       SetColorMatrix (colorMatrix, colorMatrixFlag, ColorAdjustType.Default);
+                       SetColorMatrix (newColorMatrix, flags, ColorAdjustType.Default);
                }
 
-               public void SetColorMatrix (ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag, ColorAdjustType colorAdjustType)
+               public void SetColorMatrix (ColorMatrix newColorMatrix, ColorMatrixFlag mode, ColorAdjustType type)
                {
-                       IntPtr cm = ColorMatrix.Alloc (colorMatrix);
+                       IntPtr cm = ColorMatrix.Alloc (newColorMatrix);
                        try {
                                Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr, 
-                                       colorAdjustType, true, cm, IntPtr.Zero, colorMatrixFlag);
+                                       type, true, cm, IntPtr.Zero, mode);
                                GDIPlus.CheckStatus (status);
                        }
                        finally {
@@ -294,9 +294,9 @@ namespace System.Drawing.Imaging {
                        SetGamma (gamma, ColorAdjustType.Default);
                }
 
-               public void SetGamma (float gamma, ColorAdjustType coloradjust)
+               public void SetGamma (float gamma, ColorAdjustType type)
                {
-                       Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, coloradjust, true, gamma);
+                       Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, type, true, gamma);
                        GDIPlus.CheckStatus (status);                                           
                }       
                
index 7498619e3c045412c5eaabe24ecb612a11391c2c..b28654bae370bc05486a2be5e24de4a38a5fb9e4 100644 (file)
@@ -220,10 +220,10 @@ namespace System.Drawing.Imaging {
                }
 
                public Metafile (IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type,
-                       string description)
+                       string desc)
                {
                        Status status = GDIPlus.GdipRecordMetafileI (referenceHdc, type, ref frameRect, frameUnit,
-                               description, out nativeObject);
+                               desc, out nativeObject);
                        GDIPlus.CheckStatus (status);
                }
 
@@ -261,8 +261,8 @@ namespace System.Drawing.Imaging {
                }
                
                public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, 
-                       string description) : this (fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual,
-                       description
+                       string desc) : this (fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual,
+                       desc) 
                {
                }
                
@@ -405,11 +405,11 @@ namespace System.Drawing.Imaging {
                }
 
                [MonoLimitation ("Metafiles aren't only partially supported by libgdiplus.")]
-               public static MetafileHeader GetMetafileHeader (IntPtr henhmetafile, WmfPlaceableFileHeader wmfHeader)
+               public static MetafileHeader GetMetafileHeader (IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader)
                {
                        IntPtr header = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (MetafileHeader)));
                        try {
-                               Status status = GDIPlus.GdipGetMetafileHeaderFromEmf (henhmetafile, header);
+                               Status status = GDIPlus.GdipGetMetafileHeaderFromEmf (hmetafile, header);
                                GDIPlus.CheckStatus (status);
                                return new MetafileHeader (header);
                        }
index 64d13ab0594d1fa0d4bf6ecf7ffb3fa6761fb0f8..f983b74f6b68d251c6228745e37ddd95b3041131 100644 (file)
@@ -56,7 +56,7 @@ namespace System.Drawing
                                                            IntPtr data,
                                                            PlayRecordCallback callbackData);
                
-               public delegate bool DrawImageAbort (IntPtr callbackData);
+               public delegate bool DrawImageAbort (IntPtr callbackdata);
 
                internal Graphics (IntPtr nativeGraphics)
                {