Graphics.GetVisibleClipBounds(RectF*) method
Applies to: desktop apps only
The Graphics::GetVisibleClipBounds method gets a rectangle that encloses 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
Status GetVisibleClipBounds(
[out] RectF* rect
) const;
Parameters
rect [out]
Type: RectF*Pointer to a RectF object that receives the rectangle that encloses the visible clipping region.
Return value
Type:
Type: Status****
If the method succeeds, it returns Ok, which is an element of the Status enumeration.
If the method fails, it returns one of the other elements of the Status enumeration.
Examples
The following example sets the clipping region for the Graphics object. It then gets a rectangle that encloses the visible clipping region and fills that rectangle.
VOID Example_GetVisibleClipBounds2(HDC hdc)
{
Graphics graphics(hdc);
// Set the clipping region.
graphics.SetClip(RectF(100.0f, 100.0f, 200.0f, 100.0f));
// Get a bounding rectangle for the clipping region.
RectF boundRect;
graphics.GetVisibleClipBounds(&boundRect);
// Fill the bounding rectangle.
graphics.FillRectangle(&SolidBrush(Color(255, 0, 0, 0)), boundRect);
}
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
Send comments about this topic to Microsoft
Build date: 3/6/2012