Graphics::ExcludeClip 方法将剪辑区域更新为本身不与指定矩形相交的部分。
语法
Status ExcludeClip(
  const RectF & rect
);
参数
rect
对用于更新剪切区域的矩形的引用。
返回值
如果方法成功,则返回 Ok,这是 Status 枚举的元素。
如果 方法失败,它将返回 Status 枚举的其他元素之一。
注解
示例
以下示例使用一个矩形来更新剪裁区域,然后绘制一个矩形来演示更新的剪辑区域。
VOID Example_ExcludeClip2(HDC hdc)
{
   Graphics graphics(hdc);
   // Create a RectF object, and set the clipping region to its exclusion.
   RectF excludeRect(100.0f, 100.0f, 200.0f, 200.0f);
   graphics.ExcludeClip(excludeRect);
   // Fill a rectangle to demonstrate the clipping region.
   graphics.FillRectangle(&SolidBrush((255, 0, 0, 255)), 0, 0, 600, 600);
}
要求
| 标头 | gdiplusgraphics.h | 
另请参阅
StringFormat