Partager via


CRenderTarget::DrawRectangle

Draws the outline of a rectangle that has the specified dimensions and stroke style.

void DrawRectangle(
   const CD2DRectF& rect,
   CD2DBrush* pBrush,
   FLOAT fStrokeWidth = 1.0,
   ID2D1StrokeStyle* strokeStyle = NULL
);

Parameters

  • rect
    The dimensions of the rectangle to draw, in device-independent pixels

  • pBrush
    The brush used to paint the rectangle's stroke

  • fStrokeWidth
    A value greater than or equal to 0.0f that specifies the width of the rectangle's stroke. The stroke is centered on the rectangle's outline.

  • strokeStyle
    The style of stroke to paint, or NULL to paint a solid stroke.

Requirements

Header: afxrendertarget.h

See Also

Reference

CRenderTarget Class