Table of Contents

Method DrawRectangle

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

DrawRectangle(RectFloat, IDeviceBrush, float, IStrokeStyle?)

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

void DrawRectangle(RectFloat rect, IDeviceBrush brush, float strokeWidth = 1, IStrokeStyle? strokeStyle = null)

Parameters

rect RectFloat

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

brush IDeviceBrush

The brush used to paint the rectangle's stroke.

strokeWidth 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 IStrokeStyle

The style of stroke to paint, or null to paint a solid stroke.