コード例 #1
0
ファイル: DRectangle.cs プロジェクト: pitt123/DlibDotNet
 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
ファイル: DRectangle.cs プロジェクト: tnw513/DlibDotNet
 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
ファイル: DRectangle.cs プロジェクト: pitt123/DlibDotNet
 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
ファイル: DRectangle.cs プロジェクト: pitt123/DlibDotNet
 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
ファイル: DRectangle.cs プロジェクト: pitt123/DlibDotNet
 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
ファイル: DRectangle.cs プロジェクト: pitt123/DlibDotNet
        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;
            }
        }