CGpGraphics.ResetClipmethod
Sets the clipping region of this **Graphics** object to an infinite region.
Syntax
FUNCTION ResetClip () AS GpStatus
Return value
If the function succeeds, it returns StatusOk, which is an element of the GpStatus enumeration.
If the function fails, it returns one of the other elements of the GpStatus enumeration.
Description
Sets the clipping region of this Graphics object to an infinite region.
Example
' ======================================================================================== ' The following example creates a Graphics object and sets its clipping region to a rectangle. ' The code fills two ellipses that intersect the rectangular clipping region. The first ' ellipse is clipped, but the second ellipse is not clipped because it is filled after a ' call to Graphics.ResetClip. ' ======================================================================================== SUB Example_ResetClip (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // Set the clipping region, and draw its outline. graphics.SetClip(100, 50, 200, 120) DIM blackPen AS CGpPen = CGpPen(ARGB_BLACK, 2)
' // Fill a clipped ellipse in red. DIM redBrush AS CGpSolidBrush = CGpSolidBrush(ARGB_RED) graphics.FillEllipse(@redBrush, 80, 40, 100, 70)
' // Reset the clipping region. graphics.ResetClip
' // Fill an unclipped ellipse with blue. DIM blueBrush AS CGpSolidBrush = CGpSolidBrush(ARGB_BLUE) graphics.FillEllipse(@blueBrush, 160, 150, 100, 60)
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:1382
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class