当前位置: 首页>>代码示例>>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;未经允许,请勿转载。