CGpGraphics.GetVisibleClipBoundsmethod
Gets a rectangle that encloses the visible clipping region of this **Graphics** object.
Syntax
FUNCTION GetVisibleClipBounds (BYVAL rc AS GpRectF PTR) AS GpStatus
FUNCTION GetVisibleClipBounds (BYVAL rc AS GpRect PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
rc | Pointer to a GpRectF or GpRect object that receives the rectangle that encloses the visible clipping region. |
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
Gets a rectangle that encloses the visible clipping region of this Graphics object. The visible clipping region is the intersection of the clipping region of this Graphics object and the clipping region of the window.
Example
' ======================================================================================== ' The following example sets the clipping region for the Graphics object. It then gets a ' rectangle that encloses the visible clipping region and fills that rectangle. ' ======================================================================================== SUB Example_GetVisibleClipBounds (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. DIM rc AS GpRect = (100, 100, 200, 100) graphics.SetClip(@rc)
' // Get a bounding rectangle for the clipping region. DIM boundRect AS GpRect graphics.GetVisibleClipBounds(@boundRect)
' // Fill the bounding rectangle. graphics.FillRectangle(@CGpSolidBrush(ARGB_BLACK), @boundRect)
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:1434
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class