ID2D1RenderTarget::DrawRoundedRectangle method

Draws the outline of the specified rounded rectangle using the specified stroke style.

Syntax


virtual void DrawRoundedRectangle(
  [in]           const D2D1_ROUNDED_RECT *roundedRect,
  [in]                 ID2D1Brush        *brush,
                       FLOAT             strokeWidth = 1.0f,
  [in, optional]       ID2D1StrokeStyle  *strokeStyle = NULL
) = 0;

Parameters

roundedRect [in]

Type: const D2D1_ROUNDED_RECT*

The dimensions of the rounded rectangle to draw, in device-independent pixels.

brush [in]

Type: ID2D1Brush*

The brush used to paint the rounded rectangle's outline.

strokeWidth

Type: FLOAT

The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.

strokeStyle [in, optional]

Type: ID2D1StrokeStyle*

The style of the rounded rectangle's stroke, or NULL to paint a solid stroke. The default value is NULL.

Return value

This method does not return a value.

Remarks

This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawRoundedRectangle) failed, check the result returned by the ID2D1RenderTarget::EndDraw or ID2D1RenderTarget::Flush methods.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget
How to Draw and Fill a Basic Shape
D2D1::RoundedRect

 

 

Show: