diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-03-15 19:21:16 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2017-03-16 15:02:09 +0300 |
commit | 1ba011835d94d633a0ea7cbdbccb2a936287d071 (patch) | |
tree | 80421b6330929c23654a39c8d73e682c1fd1bf04 /mcs/class/System.Drawing | |
parent | 96db2c2751c3ff16cf748e213aaa17ef9af3f095 (diff) |
[System.Drawing] Rename method parameters to match .NET contract
Diffstat (limited to 'mcs/class/System.Drawing')
7 files changed, 77 insertions, 77 deletions
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs index 191fc387f4c..dc747fdfb58 100644 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs +++ b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs @@ -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); } diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs index 024e0c2adde..9c92b91caa5 100644 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs +++ b/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs @@ -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); } diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs index 3b042cad175..515362c99df 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs @@ -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 diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs index f21831faa49..8f19320aac3 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs @@ -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); } diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs index 4bf494ea088..dbbf98d5fa1 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs @@ -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); } diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs index 7498619e3c0..b28654bae37 100644 --- a/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs +++ b/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs @@ -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); } diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.cs index 64d13ab0594..f983b74f6b6 100644 --- a/mcs/class/System.Drawing/System.Drawing/Graphics.cs +++ b/mcs/class/System.Drawing/System.Drawing/Graphics.cs @@ -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) { |