diff options
author | Ravindra <ravindra@mono-cvs.ximian.com> | 2004-03-23 11:23:43 +0300 |
---|---|---|
committer | Ravindra <ravindra@mono-cvs.ximian.com> | 2004-03-23 11:23:43 +0300 |
commit | bb8fe26a6ec8fca5deb935c2e41c80f94ac55f5b (patch) | |
tree | 4d1837f64f402525c9d0f60283e9395f06c1020e /mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs | |
parent | c9a34c38b65d86794e26853a86b8a25afe57236e (diff) |
Implementing LinearGradientBrush.cs public methods.
svn path=/trunk/mcs/; revision=24452
Diffstat (limited to 'mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs')
-rw-r--r-- | mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs | 79 |
1 files changed, 62 insertions, 17 deletions
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs index f3e006b3409..ffb6b749ebd 100644 --- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs +++ b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.cs @@ -171,41 +171,86 @@ namespace System.Drawing.Drawing2D // Public Methods - [MonoTODO()] - public override object Clone () - { - throw new NotImplementedException (); - } - - [MonoTODO()] public void MultiplyTransform (Matrix matrix) { - throw new NotImplementedException (); + MultiplyTransform (matrix, MatrixOrder.Prepend); } - [MonoTODO()] public void MultiplyTransform (Matrix matrix, MatrixOrder order) { - throw new NotImplementedException (); + Status status = GDIPlus.GdipMultiplyLineTransform (nativeObject, matrix.nativeMatrix, order); + GDIPlus.CheckStatus (status); } - [MonoTODO()] public void ResetTransform () { - throw new NotImplementedException (); + Status status = GDIPlus.GdipResetLineTransform (nativeObject); + GDIPlus.CheckStatus (status); + } + + public void RotateTransform (float angle) + { + RotateTransform (angle, MatrixOrder.Prepend); } - [MonoTODO()] public void RotateTransform (float angle, MatrixOrder order) { - throw new NotImplementedException (); + Status status = GDIPlus.GdipRotateLineTransform (nativeObject, angle, order); + GDIPlus.CheckStatus (status); } - [MonoTODO()] - public void RotateTransform (float angle) + public void ScaleTransform (float sx, float sy) + { + ScaleTransform (sx, sy, MatrixOrder.Prepend); + } + + public void ScaleTransform (float sx, float sy, MatrixOrder order) + { + Status status = GDIPlus.GdipScaleLineTransform (nativeObject, sx, sy, order); + GDIPlus.CheckStatus (status); + } + + public void SetBlendTriangularShape (float focus) + { + SetBlendTriangularShape (focus, 1.0F); + } + + public void SetBlendTriangularShape (float focus, float scale) + { + Status status = GDIPlus.GdipSetLineLinearBlend (nativeObject, focus, scale); + GDIPlus.CheckStatus (status); + } + + public void SetSigmaBellShape (float focus) { - throw new NotImplementedException (); + SetSigmaBellShape (focus, 1.0F); } + public void SetSigmaBellShape (float focus, float scale) + { + Status status = GDIPlus.GdipSetLineSigmaBlend (nativeObject, focus, scale); + GDIPlus.CheckStatus (status); + } + + public void TranslateTransform (float dx, float dy) + { + TranslateTransform (dx, dy, MatrixOrder.Prepend); + } + + public void TranslateTransform (float dx, float dy, MatrixOrder order) + { + Status status = GDIPlus.GdipTranslateLineTransform (nativeObject, dx, dy, order); + GDIPlus.CheckStatus (status); + } + + public override object Clone () + { + IntPtr clonePtr; + Status status = GDIPlus.GdipCloneBrush (nativeObject, out clonePtr); + GDIPlus.CheckStatus (status); + + LinearGradientBrush clone = new LinearGradientBrush (clonePtr); + return clone; + } } } |