/// <summary>Must be matched with a call to EndTransform (SVG puts all the transformed elements into a group) /// Transforms, clips and grouping must nest correctly - no overlapping allowed</summary> public abstract void MultiplyTransform(Matrix matrix, MatrixOrder order);
public void TranslateTransform(float dx, float dy, MatrixOrder order) { lock(this) { if(transform == null) { transform = new Matrix(); } transform.Translate(dx, dy, order); Modified(); } }
public void MultiplyTransform(Matrix matrix, MatrixOrder order) { if (matrix == null) { throw new ArgumentNullException("matrix"); } gradientTransform.Multiply(matrix, order); changed = true; }
internal static extern GpStatus GdipScalePenTransform(GpPen pen, float sx, float sy, MatrixOrder order);
public void TranslateTransform(float tx, float ty, MatrixOrder order) { //Console.WriteLine ("Currently does not support anything but prepend mode"); modelMatrix.Translate(tx, ty, order); applyModelView(); }
internal static extern Status GdipTranslatePenTransform (IntPtr pen, float dx, float dy, MatrixOrder order);
public void TranslateTransform(float dx, float dy, MatrixOrder order) { this._innerGraphics.TranslateTransform(dx, dy, order); }
public void Rotate(float angle, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipRotateMatrix(new HandleRef(this, NativeMatrix), angle, order)); }
public void RotateTransform(float angle, MatrixOrder order) { Status status = GDIPlus.GdipRotateTextureTransform(nativeObject, angle, order); GDIPlus.CheckStatus(status); }
public void Translate(float offsetX, float offsetY, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipTranslateMatrix( new HandleRef(this, NativeMatrix), offsetX, offsetY, order)); }
public void Scale(float scaleX, float scaleY, MatrixOrder order) { Gdip.CheckStatus(Gdip.GdipScaleMatrix(new HandleRef(this, NativeMatrix), scaleX, scaleY, order)); }
public void TranslateTransform(float dx, float dy, MatrixOrder order) { Status status = GDIPlus.GdipTranslateLineTransform(NativeBrush, dx, dy, order); GDIPlus.CheckStatus(status); }
public void ScaleTransform(float sx, float sy, MatrixOrder order) { Status status = GDIPlus.GdipScaleLineTransform(NativeBrush, sx, sy, order); GDIPlus.CheckStatus(status); }
public void RotateTransform(float angle, MatrixOrder order) { Status status = GDIPlus.GdipRotateLineTransform(NativeBrush, angle, order); GDIPlus.CheckStatus(status); }
internal static extern Status GdipScaleWorldTransform (IntPtr graphics, float sx, float sy, MatrixOrder order);
public void ScaleTransform(float sx, float sy, MatrixOrder order) { Status status = GDIPlus.GdipScaleTextureTransform(nativeObject, sx, sy, order); GDIPlus.CheckStatus(status); }
internal static extern Status GdipRotatePenTransform (IntPtr pen, float angle, MatrixOrder order);
public void TranslateTransform(float dx, float dy, MatrixOrder order) { Status status = GDIPlus.GdipTranslateTextureTransform(nativeObject, dx, dy, order); GDIPlus.CheckStatus(status); }
public void TranslateTransform(float dx, float dy, MatrixOrder order) { int status = SafeNativeMethods.Gdip.GdipTranslatePathGradientTransform(new HandleRef(this, base.NativeBrush), dx, dy, order); if (status != 0) { throw SafeNativeMethods.Gdip.StatusException(status); } }
public void RotateTransform(float angle, MatrixOrder order) { gradientTransform.Rotate(angle, order); changed = true; }
internal static extern GpStatus GdipMultiplyPenTransform(GpPen pen, GpMatrix matrix, MatrixOrder order);
public void ScaleTransform(float sx, float sy, MatrixOrder order) { gradientTransform.Scale(sx, sy, order); changed = true; }
public void RotateTransform(float angle, MatrixOrder order) { modelMatrix.Rotate(angle, order); applyModelView(); }
public void TranslateTransform(float dx, float dy, MatrixOrder order) { gradientTransform.Translate(dx, dy, order); changed = true; }
public void RotateTransform(float angle, MatrixOrder order) { lock(this) { if(transform == null) { transform = new Matrix(); } transform.Rotate(angle, order); Modified(); } }
public void MultiplyTransform_Matrix_SetsTransformToExpected(Matrix originalTransform, Matrix matrix, MatrixOrder matrixOrder) { try { using (var image = new Bitmap(10, 10)) using (var brush = new TextureBrush(image)) using (var expected = (Matrix)originalTransform.Clone()) { expected.Multiply(matrix, matrixOrder); brush.Transform = originalTransform; if (matrixOrder == MatrixOrder.Prepend) { TextureBrush clone = (TextureBrush)brush.Clone(); clone.MultiplyTransform(matrix); Assert.Equal(expected, clone.Transform); } brush.MultiplyTransform(matrix, matrixOrder); Assert.Equal(expected, brush.Transform); } } finally { originalTransform.Dispose(); matrix.Dispose(); } }
internal static extern GpStatus GdipMultiplyWorldTransform(GpGraphics graphics, GpMatrix matrix, MatrixOrder order);
public void TranslateTransform_Invoke_SetsTransformToExpected(Matrix originalTransform, float dX, float dY, MatrixOrder matrixOrder) { try { using (var image = new Bitmap(10, 10)) using (var brush = new TextureBrush(image)) using (Matrix expected = originalTransform.Clone()) { expected.Translate(dX, dY, matrixOrder); brush.Transform = originalTransform; if (matrixOrder == MatrixOrder.Prepend) { TextureBrush clone = (TextureBrush)brush.Clone(); clone.TranslateTransform(dX, dY); Assert.Equal(expected, clone.Transform); } brush.TranslateTransform(dX, dY, matrixOrder); Assert.Equal(expected, brush.Transform); } } finally { originalTransform.Dispose(); } }
public void TranslateTransform(float dx, float dy, MatrixOrder order = MatrixOrder.Append) { Transform.Translate(dx, dy, order); }
static internal extern Status GdipTranslateWorldTransform(IntPtr graphics, float dx, float dy, MatrixOrder order);
public void RotateTransform(float fAngle, MatrixOrder order = MatrixOrder.Append) { Transform.Rotate(fAngle, order); }
internal static extern Status GdipMultiplyPenTransform (IntPtr pen, IntPtr matrix, MatrixOrder order);
public void ScaleTransform(float sx, float sy, MatrixOrder order = MatrixOrder.Append) { Transform.Scale(sx, sy, order); }
internal static extern Status GdipScalePenTransform (IntPtr pen, float sx, float sy, MatrixOrder order);
public void MultiplyTransform(Matrix matrix, MatrixOrder order) { throw null; }
public void MultiplyTransform(Matrix matrix, MatrixOrder order) { if (matrix == null) { throw new ArgumentNullException("matrix"); } int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new HandleRef(this, base.NativeBrush), new HandleRef(matrix, matrix.nativeMatrix), order); if (status != 0) { throw SafeNativeMethods.Gdip.StatusException(status); } }
public void TranslateTransform(float dx, float dy, MatrixOrder order) { throw null; }
public void ScaleTransform(float sx, float sy, MatrixOrder order) { this._innerGraphics.ScaleTransform(sx, sy, order); }
public void ScaleTransform(float sx, float sy, MatrixOrder order) { throw null; }
internal static extern GpStatus GdipTranslatePenTransform(GpPen pen, float dx, float dy, MatrixOrder order);
public void RotateTransform(float angle, MatrixOrder order) { throw null; }
internal static extern GpStatus GdipRotatePenTransform(GpPen pen, float angle, MatrixOrder order);
public void Rotate(float angle, MatrixOrder order) { Status status = SafeNativeMethods.Gdip.GdipRotateMatrix(nativeMatrix, angle, order); SafeNativeMethods.Gdip.CheckStatus(status); }
public void MultiplyTransform(Matrix matrix, MatrixOrder order) { if (matrix == null) throw new ArgumentNullException ("matrix"); if (order == MatrixOrder.Prepend) context.ConcatCTM (matrix.transform); else context.ConcatCTM (matrix.transform); }
public void Scale(float scaleX, float scaleY, MatrixOrder order) { Status status = SafeNativeMethods.Gdip.GdipScaleMatrix(nativeMatrix, scaleX, scaleY, order); SafeNativeMethods.Gdip.CheckStatus(status); }
public void ScaleTransform(float sx, float sy, MatrixOrder order) { modelMatrix.Scale(sx,sy,order); applyModelView(); }
public void Shear(float shearX, float shearY, MatrixOrder order) { Status status = SafeNativeMethods.Gdip.GdipShearMatrix(nativeMatrix, shearX, shearY, order); SafeNativeMethods.Gdip.CheckStatus(status); }
public void MultiplyTransform(Matrix matrix, MatrixOrder order) { lock(this) { if(transform == null) { transform = new Matrix(); } transform.Multiply(matrix, order); Modified(); } }
public void Translate(float offsetX, float offsetY, MatrixOrder order) { Status status = SafeNativeMethods.Gdip.GdipTranslateMatrix(nativeMatrix, offsetX, offsetY, order); SafeNativeMethods.Gdip.CheckStatus(status); }
public void ScaleTransform(float sx, float sy, MatrixOrder order) { lock(this) { if(transform == null) { transform = new Matrix(); } transform.Scale(sx, sy, order); Modified(); } }
public void MultiplyTransform(Matrix matrix, MatrixOrder order) { this.baseGraphics.MultiplyTransform(matrix, order); }
internal static extern GpStatus GdipTranslateWorldTransform(GpGraphics graphics, float dx, float dy, MatrixOrder order);
public void RotateTransform(float angle, MatrixOrder order) { this.baseGraphics.RotateTransform(angle, order); }
internal static extern GpStatus GdipScaleWorldTransform(GpGraphics graphics, float sx, float sy, MatrixOrder order);
public void ScaleTransform(float sx, float sy, MatrixOrder order) { this.baseGraphics.ScaleTransform(sx, sy, order); }
static internal extern Status GdipRotateWorldTransform(IntPtr graphics, float angle, MatrixOrder order);
public void Translate_InvalidMatrixOrder_ThrowsArgumentException(MatrixOrder order) { var matrix = new Matrix(); Assert.Throws <ArgumentException>(null, () => matrix.Translate(1, 2, order)); }