Help Center

CGpGraphics.IsVisibleClipEmptymethod

Determines whether the visible clipping region of this **Graphics** object is empty.

GraphicsmethodCGpGraphics.incdocumented

Syntax

FUNCTION IsVisibleClipEmpty () AS BOOLEAN

Return value

If the visible clipping region of this Graphics object is empty, this method returns TRUE; otherwise, it returns FALSE.

Description

Determines whether the visible clipping region of this Graphics object is empty. The visible clipping region is the intersection of the clipping region of this Graphics object and the clipping region of the window.

Remarks

If the visible clipping region of a Graphics object is empty, there is no area left in which to draw. Consequently, nothing will be drawn when the visible 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_IsVisibleClipEmpty (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.IsVisibleClipEmpty = FALSE THEN

graphics.FillEllipse(@CGpSolidBrush(ARGB_BLACK), 100, 100, 5, 5)

END IF

END SUB ' ========================================================================================

Reference

  • Include file CGpGraphics.inc
  • Defined in AfxNova/CGpGraphics.inc:1449
  • Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
  • Topic: CGpGraphics Class