CGpGraphics.IsClipEmptymethod
Determines whether the clipping region of this **Graphics** object is empty.
Syntax
FUNCTION IsClipEmpty () AS BOOLEAN
Description
Determines whether the clipping region of this Graphics object is empty.
####Return value
If the clipping region of a Graphics object is empty, this method returns TRUE; otherwise, it returns FALSE.
Remarks
If the clipping region of a Graphics object is empty, there is no area left in which to draw. Consequently, nothing will be drawn when the clipping region is empty.
Example
' ======================================================================================== ' The following example determines whether the clipping region is empty and, if it isn't, ' draws a rectangle. ' ======================================================================================== SUB Example_IsClipEmpty (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // If the clipping region is not empty, draw a rectangle. IF graphics.IsClipEmpty = FALSE THEN
graphics.DrawRectangle(@CGpPen(ARGB_BLACK, 3), 0, 0, 100, 100)
END IF
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:1422
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class