public PointTransformAffine(Matrix <double> matrix, DPoint vector)
        {
            if (matrix == null)
            {
                throw new ArgumentNullException(nameof(matrix));
            }
            if (vector == null)
            {
                throw new ArgumentNullException(nameof(vector));
            }

            matrix.ThrowIfDisposed();

            if (matrix.Columns != 2 || matrix.Rows != 2)
            {
                throw new ArgumentException($"{nameof(matrix)} should be 2x2 matrix");
            }

            using (var native = vector.ToNative())
                this.NativePtr = Native.point_transform_affine_new1(matrix.NativePtr, native.NativePtr);
        }
Exemple #2
0
 public static DPoint Rotate(DPoint center, DPoint point, double angle)
 {
     return(center.Rotate(point, angle));
 }
Exemple #3
0
 public PointTransform(double angle, double x, double y)
 {
     using (var native = new DPoint(x, y).ToNative())
         this.NativePtr = Native.point_transform_new1(angle, native.NativePtr);
 }
Exemple #4
0
 public DRectangle Translate(DPoint point)
 {
     return(Translate(this, point));
 }
Exemple #5
0
 public static DRectangle CenteredRect(double x, double y, double width, double height)
 {
     using (var p = new DPoint(x, y))
         return(CenteredRect(p, width, height));
 }
Exemple #6
0
 public PointTransform(double angle, double x, double y)
 {
     using (var vector = new DPoint(x, y))
         this.NativePtr = Native.point_transform_new1(angle, vector.NativePtr);
 }