public static double Length(DPoint point) { using (var native = point.ToNative()) { NativeMethods.matrix_length_dpoint(native.NativePtr, out var length); return(length); } }
public override DPoint Operator(DPoint point) { using (var native = point.ToNative()) { var ptr = Native.point_rotator_operator(this.NativePtr, native.NativePtr); return(new DPoint(ptr)); } }
public override DPoint Operator(DPoint point) { using (var native = point.ToNative()) { var ptr = NativeMethods.point_transform_operator(this.NativePtr, native.NativePtr); return(new DPoint(ptr)); } }
public PointTransform(double angle, DPoint vector) { if (vector == null) { throw new ArgumentNullException(nameof(vector)); } using (var native = vector.ToNative()) this.NativePtr = Native.point_transform_new1(angle, native.NativePtr); }
public DRectangle(DPoint point) { using (var np = point.ToNative()) using (var native = new NativeDRectangle(np)) { this._Left = native.Left; this._Top = native.Top; this._Right = native.Right; this._Bottom = native.Bottom; } }
public DRectangle(DPoint p1, DPoint p2) { using (var np1 = p1.ToNative()) using (var np2 = p2.ToNative()) using (var native = new NativeDRectangle(np1, np2)) { this._Left = native.Left; this._Top = native.Top; this._Right = native.Right; this._Bottom = native.Bottom; } }
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); }