예제 #1
0
 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;
     }
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
 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;
         }
 }
예제 #4
0
 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;
         }
 }
예제 #5
0
 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;
             }
 }
예제 #6
0
        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;
            }
        }