예제 #1
0
파일: Canvas.cs 프로젝트: stuart2w/SAW
 /// <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);
예제 #2
0
	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;
 }
예제 #4
0
파일: Pens.cs 프로젝트: north0808/haina
 internal static extern GpStatus GdipScalePenTransform(GpPen pen, float sx, float sy, MatrixOrder order);
예제 #5
0
 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();
 }
예제 #6
0
 internal static extern Status GdipTranslatePenTransform (IntPtr pen, float dx, float dy, MatrixOrder order);
예제 #7
0
 public void TranslateTransform(float dx, float dy, MatrixOrder order)
 {
     this._innerGraphics.TranslateTransform(dx, dy, order);
 }
예제 #8
0
 public void Rotate(float angle, MatrixOrder order)
 {
     Gdip.CheckStatus(Gdip.GdipRotateMatrix(new HandleRef(this, NativeMatrix), angle, order));
 }
예제 #9
0
        public void RotateTransform(float angle, MatrixOrder order)
        {
            Status status = GDIPlus.GdipRotateTextureTransform(nativeObject, angle, order);

            GDIPlus.CheckStatus(status);
        }
예제 #10
0
 public void Translate(float offsetX, float offsetY, MatrixOrder order)
 {
     Gdip.CheckStatus(Gdip.GdipTranslateMatrix(
                          new HandleRef(this, NativeMatrix),
                          offsetX, offsetY, order));
 }
예제 #11
0
 public void Scale(float scaleX, float scaleY, MatrixOrder order)
 {
     Gdip.CheckStatus(Gdip.GdipScaleMatrix(new HandleRef(this, NativeMatrix), scaleX, scaleY, order));
 }
예제 #12
0
        public void TranslateTransform(float dx, float dy, MatrixOrder order)
        {
            Status status = GDIPlus.GdipTranslateLineTransform(NativeBrush, dx, dy, order);

            GDIPlus.CheckStatus(status);
        }
예제 #13
0
        public void ScaleTransform(float sx, float sy, MatrixOrder order)
        {
            Status status = GDIPlus.GdipScaleLineTransform(NativeBrush, sx, sy, order);

            GDIPlus.CheckStatus(status);
        }
예제 #14
0
        public void RotateTransform(float angle, MatrixOrder order)
        {
            Status status = GDIPlus.GdipRotateLineTransform(NativeBrush, angle, order);

            GDIPlus.CheckStatus(status);
        }
예제 #15
0
 		internal static extern Status GdipScaleWorldTransform (IntPtr graphics, float sx, float sy, MatrixOrder order); 		
예제 #16
0
        public void ScaleTransform(float sx, float sy, MatrixOrder order)
        {
            Status status = GDIPlus.GdipScaleTextureTransform(nativeObject, sx, sy, order);

            GDIPlus.CheckStatus(status);
        }
예제 #17
0
 internal static extern Status GdipRotatePenTransform (IntPtr pen, float angle, MatrixOrder order);
예제 #18
0
        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);
     }
 }
예제 #20
0
 public void RotateTransform(float angle, MatrixOrder order)
 {
     gradientTransform.Rotate(angle, order);
     changed = true;
 }
예제 #21
0
파일: Pens.cs 프로젝트: north0808/haina
 internal static extern GpStatus GdipMultiplyPenTransform(GpPen pen, GpMatrix matrix, MatrixOrder order);
예제 #22
0
 public void ScaleTransform(float sx, float sy, MatrixOrder order)
 {
     gradientTransform.Scale(sx, sy, order);
     changed = true;
 }
예제 #23
0
 public void RotateTransform(float angle, MatrixOrder order)
 {
     modelMatrix.Rotate(angle, order);
     applyModelView();
 }
예제 #24
0
 public void TranslateTransform(float dx, float dy, MatrixOrder order)
 {
     gradientTransform.Translate(dx, dy, order);
     changed = true;
 }
예제 #25
0
	public void RotateTransform(float angle, MatrixOrder order)
			{
				lock(this)
				{
					if(transform == null)
					{
						transform = new Matrix();
					}
					transform.Rotate(angle, order);
					Modified();
				}
			}
예제 #26
0
        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();
            }
        }
예제 #27
0
 internal static extern GpStatus GdipMultiplyWorldTransform(GpGraphics graphics, GpMatrix matrix, MatrixOrder order);
예제 #28
0
        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 ScaleTransform(float sx, float sy, MatrixOrder order)
 {
     gradientTransform.Scale(sx, sy, order);
     changed = true;
 }
예제 #30
0
 public void TranslateTransform(float dx, float dy, MatrixOrder order = MatrixOrder.Append)
 {
     Transform.Translate(dx, dy, order);
 }
예제 #31
0
		static internal extern Status GdipTranslateWorldTransform(IntPtr graphics, float dx, float dy, MatrixOrder order);
예제 #32
0
 public void RotateTransform(float fAngle, MatrixOrder order = MatrixOrder.Append)
 {
     Transform.Rotate(fAngle, order);
 }
예제 #33
0
 internal static extern Status GdipMultiplyPenTransform (IntPtr pen, IntPtr matrix, MatrixOrder order);
예제 #34
0
 public void ScaleTransform(float sx, float sy, MatrixOrder order = MatrixOrder.Append)
 {
     Transform.Scale(sx, sy, order);
 }
예제 #35
0
 internal static extern Status GdipScalePenTransform (IntPtr pen, float sx, float sy, MatrixOrder order);
예제 #36
0
 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);
     }
 }
예제 #38
0
 public void TranslateTransform(float dx, float dy, MatrixOrder order)
 {
     throw null;
 }
예제 #39
0
 public void ScaleTransform(float sx, float sy, MatrixOrder order)
 {
     this._innerGraphics.ScaleTransform(sx, sy, order);
 }
예제 #40
0
 public void ScaleTransform(float sx, float sy, MatrixOrder order)
 {
     throw null;
 }
예제 #41
0
파일: Pens.cs 프로젝트: north0808/haina
 internal static extern GpStatus GdipTranslatePenTransform(GpPen pen, float dx, float dy, MatrixOrder order);
예제 #42
0
 public void RotateTransform(float angle, MatrixOrder order)
 {
     throw null;
 }
예제 #43
0
파일: Pens.cs 프로젝트: north0808/haina
 internal static extern GpStatus GdipRotatePenTransform(GpPen pen, float angle, MatrixOrder order);
예제 #44
0
파일: Matrix.cs 프로젝트: wenchaoli/corefx
        public void Rotate(float angle, MatrixOrder order)
        {
            Status status = SafeNativeMethods.Gdip.GdipRotateMatrix(nativeMatrix, angle, order);

            SafeNativeMethods.Gdip.CheckStatus(status);
        }
예제 #45
0
        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);
        }
예제 #46
0
파일: Matrix.cs 프로젝트: wenchaoli/corefx
        public void Scale(float scaleX, float scaleY, MatrixOrder order)
        {
            Status status = SafeNativeMethods.Gdip.GdipScaleMatrix(nativeMatrix, scaleX, scaleY, order);

            SafeNativeMethods.Gdip.CheckStatus(status);
        }
예제 #47
0
 public void ScaleTransform(float sx, float sy, MatrixOrder order)
 {
     modelMatrix.Scale(sx,sy,order);
     applyModelView();
 }
예제 #48
0
파일: Matrix.cs 프로젝트: wenchaoli/corefx
        public void Shear(float shearX, float shearY, MatrixOrder order)
        {
            Status status = SafeNativeMethods.Gdip.GdipShearMatrix(nativeMatrix, shearX, shearY, order);

            SafeNativeMethods.Gdip.CheckStatus(status);
        }
예제 #49
0
	public void MultiplyTransform(Matrix matrix, MatrixOrder order)
			{
				lock(this)
				{
					if(transform == null)
					{
						transform = new Matrix();
					}
					transform.Multiply(matrix, order);
					Modified();
				}
			}
예제 #50
0
파일: Matrix.cs 프로젝트: wenchaoli/corefx
        public void Translate(float offsetX, float offsetY, MatrixOrder order)
        {
            Status status = SafeNativeMethods.Gdip.GdipTranslateMatrix(nativeMatrix, offsetX, offsetY, order);

            SafeNativeMethods.Gdip.CheckStatus(status);
        }
예제 #51
0
	public void ScaleTransform(float sx, float sy, MatrixOrder order)
			{
				lock(this)
				{
					if(transform == null)
					{
						transform = new Matrix();
					}
					transform.Scale(sx, sy, order);
					Modified();
				}
			}
예제 #52
0
 public void MultiplyTransform(Matrix matrix, MatrixOrder order)
 {
     this.baseGraphics.MultiplyTransform(matrix, order);
 }
예제 #53
0
 internal static extern GpStatus GdipTranslateWorldTransform(GpGraphics graphics, float dx, float dy, MatrixOrder order);
예제 #54
0
 public void RotateTransform(float angle, MatrixOrder order)
 {
     this.baseGraphics.RotateTransform(angle, order);
 }
예제 #55
0
 internal static extern GpStatus GdipScaleWorldTransform(GpGraphics graphics, float sx, float sy, MatrixOrder order);
예제 #56
0
 public void ScaleTransform(float sx, float sy, MatrixOrder order)
 {
     this.baseGraphics.ScaleTransform(sx, sy, order);
 }
 public void RotateTransform(float angle, MatrixOrder order)
 {
     gradientTransform.Rotate(angle, order);
     changed = true;
 }
예제 #58
0
		static internal extern Status GdipRotateWorldTransform(IntPtr graphics, float angle, MatrixOrder order);
 public void TranslateTransform(float dx, float dy, MatrixOrder order)
 {
     gradientTransform.Translate(dx, dy, order);
     changed = true;
 }
예제 #60
0
        public void Translate_InvalidMatrixOrder_ThrowsArgumentException(MatrixOrder order)
        {
            var matrix = new Matrix();

            Assert.Throws <ArgumentException>(null, () => matrix.Translate(1, 2, order));
        }