Table of Contents

Method DrawLine

Namespace
PaintDotNet.Direct2D1
Assembly
PaintDotNet.Windows.dll

DrawLine(Point2Float, Point2Float, IDeviceBrush, float, IStrokeStyle?)

Draws a line between the specified points using the specified stroke style.

void DrawLine(Point2Float point0, Point2Float point1, IDeviceBrush brush, float strokeWidth = 1, IStrokeStyle? strokeStyle = null)

Parameters

point0 Point2Float

The start point of the line, in device-independent pixels.

point1 Point2Float

The end point of the line, in device-independent pixels.

brush IDeviceBrush

The brush used to paint the line'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 line.