Skip to content

Latest commit

 

History

History
99 lines (76 loc) · 3.07 KB

nf-gdiplusgraphics-graphics-getvisibleclipbounds(rectf).md

File metadata and controls

99 lines (76 loc) · 3.07 KB
UID title description tech.root helpviewer_keywords ms.assetid ms.date ms.keywords targetos req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi f1_keywords dev_langs topic_type api_type api_location api_name
NF:gdiplusgraphics.Graphics.GetVisibleClipBounds(RectF)
Graphics::GetVisibleClipBounds
The Graphics::GetVisibleClipBounds method gets a rectangle that encloses the visible clipping region of this Graphics object. (overload 2/2)
gdiplus
Graphics::GetVisibleClipBounds
dda12bab-2ffc-4fca-9280-3bc88798fac2
05/13/2019
Graphics::GetVisibleClipBounds
Windows
function
gdiplusgraphics.h
Graphics::GetVisibleClipBounds
gdiplusgraphics/Graphics::GetVisibleClipBounds
c++
apiref
COM
gdiplusgraphics.h
Graphics::GetVisibleClipBounds

GetVisibleClipBounds(RectF*)

-description

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.

-parameters

-param rect

Pointer to a RectF object that receives the rectangle that encloses the visible clipping region.

-returns

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.

-remarks

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);
}

-see-also

GetClipBounds Methods

Graphics

Graphics::IsVisibleClipEmpty

IsVisible Methods

RectF