This documentation is archived and is not being maintained.

Region.IsVisible Method (Rectangle, Graphics)

Tests whether any portion of the specified Rectangle structure is contained within this Region when drawn using the specified Graphics.

Namespace: System.Drawing
Assembly: System.Drawing (in system.drawing.dll)

public bool IsVisible (
	Rectangle rect,
	Graphics g
)
public boolean IsVisible (
	Rectangle rect, 
	Graphics g
)
public function IsVisible (
	rect : Rectangle, 
	g : Graphics
) : boolean
Not applicable.

Parameters

rect

The Rectangle structure to test.

g

A Graphics that represents a graphics context.

Return Value

true when any portion of the rect is contained within this Region; otherwise, false.

The current transformation of the graphics context is used to compute the region interior and the rectangle coordinates on the drawing surface.

For a code example, see the IsVisible(RectangleF) method.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: