Share via


ID2D1CommandSink::D rawRectangle-Methode (d2d1_1.h)

Zeichnet ein Rechteck.

Syntax

HRESULT DrawRectangle(
  [in]           const D2D1_RECT_F *rect,
  [in]           ID2D1Brush        *brush,
                 FLOAT             strokeWidth,
  [in, optional] ID2D1StrokeStyle  *strokeStyle
);

Parameter

[in] rect

Typ: const D2D1_RECT_F*

Das Rechteck, das zur Befehlssenke gezeichnet werden soll.

[in] brush

Typ: ID2D1Brush*

Der Pinsel, der zum Streichen der Geometrie verwendet wird.

strokeWidth

Typ: FLOAT

Die Breite des Strichs.

[in, optional] strokeStyle

Typ: ID2D1StrokeStyle*

Der Stil des Strichs.

Rückgabewert

Typ: HRESULT

Wenn die Methode erfolgreich ist, gibt sie S_OK zurück. Wenn ein Fehler auftritt, wird ein HRESULT-Fehlercode zurückgegeben.

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client) Windows 8 und Plattformupdate für Windows 7 [Desktop-Apps | UWP-Apps]
Unterstützte Mindestversion (Server) Windows Server 2012 und Plattformupdate für Windows Server 2008 R2 [Desktop-Apps | UWP-Apps]
Zielplattform Windows
Kopfzeile d2d1_1.h
DLL D2d1.dll

Weitere Informationen

ID2D1CommandList::Stream

ID2D1CommandSink

ID2D1RenderTarget::D rawRectangle