CGpGraphics.IsVisiblemethod
Determines whether the specified point is inside the visible clipping region of this **Graphics** object.
Syntax
FUNCTION IsVisible (BYVAL pt AS GpPointF PTR) AS BOOLEAN
FUNCTION IsVisible (BYVAL pt AS GpPoint PTR) AS BOOLEAN
FUNCTION IsVisible (BYVAL x AS SINGLE, BYVAL y AS SINGLE) AS BOOLEAN
FUNCTION IsVisible (BYVAL x AS INT_, BYVAL y AS INT_) AS BOOLEAN
FUNCTION IsVisible (BYVAL rc AS GpRectF PTR) AS BOOLEAN
FUNCTION IsVisible (BYVAL rc AS GpRect PTR) AS BOOLEAN
FUNCTION IsVisible (BYVAL x AS SINGLE, BYVAL y AS SINGLE, BYVAL nWidth AS SINGLE, BYVAL nHeight AS SINGLE) AS BOOLEAN
FUNCTION IsVisible (BYVAL x AS INT_, BYVAL y AS INT_, BYVAL nWidth AS INT_, BYVAL nHeight AS INT_) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
pt | Reference to a point to be tested to see whether it is inside the visible clipping region. | |
x, y | Reference to a point to be tested to see whether it is inside the visible clipping region. | |
rc | Reference to a rectangle to be tested to see whether it intersects the visible clipping region. | |
x, y, nWidth, nHeight | Reference to a rectangle to be tested to see whether it intersects the visible clipping region. |
Return value
If the specified point is inside the visible clipping region, this method returns TRUE; otherwise, it returns FALSE.
Description
Determines whether the specified point is inside 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 determines whether the clipping region is empty and, if it isn't, ' draws a rectangle. ' ======================================================================================== SUB Example_IsVisible (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // Determine whether the point is visible and, if it is, draw an ellipse. IF graphics.IsVisible(100, 100) THEN
graphics.FillEllipse(@CGpSolidBrush(ARGB_BLACK), 100, 100, 5, 5)
END IF
END SUB ' ========================================================================================
Reference
- Include file
CGpGraphics.inc - Defined in AfxNova/CGpGraphics.inc:1461
- Documented in Graphics/GdiPlus Classes/CGpGraphics Classes.md
- Topic: CGpGraphics Class