Graphics.IsVisible(INT, INT) method

Applies to: desktop apps only

The Graphics::IsVisible method 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.

Syntax

BOOL IsVisible(
  [in]  INT x,
  [in]  INT y
) const;

Parameters

  • x [in]
    Type: INT

    Integer that specifies the x-coordinate of the point to test.

  • y [in]
    Type: INT

    Integer that specifies the y-coordinate of the point to test.

Return value

Type:

Type: BOOL

If the specified coordinates are inside the visible clipping region, this method returns TRUE; otherwise, it returns FALSE.

Examples

The following example tests whether the specified point is visible on the display device. If it is, it fills an ellipse that represents that point.

VOID Example_IsVisible5(HDC hdc)

{

   Graphics graphics(hdc);



   // Set up the coordinates of the point.

   int x = 100;

   int y = 100;



   // If the point (x, y) is visible, fill an ellipse that represents it.

   if (graphics.IsVisible(x, y))

   {

   graphics.FillEllipse(&SolidBrush(Color(255, 0, 0, 0)), x, y, 5, 5);

   }

}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusgraphics.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Graphics

Graphics::IsVisibleClipEmpty

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012