public DRectangle(double left, double top, double right, double bottom) { using (var native = new NativeDRectangle(left, top, right, bottom)) { this._Left = native.Left; this._Top = native.Top; this._Right = native.Right; this._Bottom = native.Bottom; } }
public DRectangle(Rectangle rect) { using (var native = new NativeDRectangle(rect.Left, rect.Top, rect.Right, rect.Bottom)) { this._Left = native.Left; this._Top = native.Top; this._Right = native.Right; this._Bottom = native.Bottom; } }
public DRectangle(DRectangle drect) { using (var src = drect.ToNative()) using (var native = new NativeDRectangle(src)) { this._Left = native.Left; this._Top = native.Top; this._Right = native.Right; this._Bottom = native.Bottom; } }
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; } }
internal DRectangle(IntPtr ptr) { if (ptr == IntPtr.Zero) { throw new ArgumentException("Can not pass IntPtr.Zero", nameof(ptr)); } using (var native = new NativeDRectangle(ptr)) { this._Left = native.Left; this._Top = native.Top; this._Right = native.Right; this._Bottom = native.Bottom; } }