當前位置: 首頁>>代碼示例>>C#>>正文


C# RectangleF.ToGPRECTF方法代碼示例

本文整理匯總了C#中System.Drawing.RectangleF.ToGPRECTF方法的典型用法代碼示例。如果您正苦於以下問題:C# RectangleF.ToGPRECTF方法的具體用法?C# RectangleF.ToGPRECTF怎麽用?C# RectangleF.ToGPRECTF使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Drawing.RectangleF的用法示例。


在下文中一共展示了RectangleF.ToGPRECTF方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Region

 public Region(RectangleF rect)
 {
     IntPtr zero = IntPtr.Zero;
     int status = SafeNativeMethods.Gdip.GdipCreateRegionRect(ref rect.ToGPRECTF(), out zero);
     if (status != 0)
     {
         throw SafeNativeMethods.Gdip.StatusException(status);
     }
     this.SetNativeRegion(zero);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:10,代碼來源:Region.cs

示例2: Region

        public Region(RectangleF rect) {
            IntPtr region = IntPtr.Zero;

            GPRECTF gprectf = rect.ToGPRECTF();

            int status = SafeNativeMethods.Gdip.GdipCreateRegionRect(ref gprectf, out region);

            if (status != SafeNativeMethods.Gdip.Ok)
                throw SafeNativeMethods.Gdip.StatusException(status);

            SetNativeRegion(region);
        }
開發者ID:mind0n,項目名稱:hive,代碼行數:12,代碼來源:Region.cs

示例3: BeginContainer

 public GraphicsContainer BeginContainer(RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit)
 {
     GraphicsContext context = new GraphicsContext(this);
     int state = 0;
     GPRECTF dstRect = dstrect.ToGPRECTF();
     GPRECTF srcRect = srcrect.ToGPRECTF();
     int status = SafeNativeMethods.Gdip.GdipBeginContainer(new HandleRef(this, this.NativeGraphics), ref dstRect, ref srcRect, (int) unit, out state);
     if (status != 0)
     {
         context.Dispose();
         throw SafeNativeMethods.Gdip.StatusException(status);
     }
     context.State = state;
     this.PushContext(context);
     return new GraphicsContainer(state);
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:16,代碼來源:Graphics.cs

示例4: Intersect

 public void Intersect(RectangleF rect)
 {
     GPRECTF gprectf = rect.ToGPRECTF();
     int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, this.nativeRegion), ref gprectf, CombineMode.Intersect);
     if (status != 0)
     {
         throw SafeNativeMethods.Gdip.StatusException(status);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:Region.cs

示例5: Complement

        // float version
        /// <include file='doc\Region.uex' path='docs/doc[@for="Region.Complement"]/*' />
        /// <devdoc>
        ///    Updates this <see cref='System.Drawing.Region'/> to the portion of the
        ///    specified <see cref='System.Drawing.RectangleF'/> that does not intersect with this <see cref='System.Drawing.Region'/>.
        /// </devdoc>
        public void Complement(RectangleF rect) {
            GPRECTF gprectf = rect.ToGPRECTF();
            int status = SafeNativeMethods.Gdip.GdipCombineRegionRect(new HandleRef(this, nativeRegion), ref gprectf, CombineMode.Complement);

            if (status != SafeNativeMethods.Gdip.Ok)
                throw SafeNativeMethods.Gdip.StatusException(status);
        }
開發者ID:mind0n,項目名稱:hive,代碼行數:13,代碼來源:Region.cs


注:本文中的System.Drawing.RectangleF.ToGPRECTF方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。