Table of Contents

Method DrawDotLine

Namespace
Alternet.Skia
Assembly
Alternet.UI.Common.dll

DrawDotLine(SKCanvas, float, float, float, float, SKPaint, SKPaint?, int)

Draws a dotted line on the specified graphics context, alternating between two colors.

public static void DrawDotLine(SKCanvas dc, float x1, float y1, float x2, float y2, SKPaint color1, SKPaint? color2, int size = 1)

Parameters

dc SKCanvas

The SKCanvas object used to draw the line.

x1 float

The starting x-coordinate of the line.

y1 float

The starting y-coordinate of the line.

x2 float

The ending x-coordinate of the line.

y2 float

The ending y-coordinate of the line.

color1 SKPaint

The primary color used for the dots in the line.

color2 SKPaint

The secondary color used for the dots in the line. If set to null, the line will alternate between the primary color and transparency.

size int

The size of each dot in pixels. Defaults to 1. Larger values result in thicker dots.

Remarks

This method supports drawing horizontal or vertical dotted lines only. The line alternates between color1 and color2 (or transparency if color2 is null). The size of the dots is determined by the size parameter.