Method DrawDotLine
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
dcSKCanvasThe SKCanvas object used to draw the line.
x1floatThe starting x-coordinate of the line.
y1floatThe starting y-coordinate of the line.
x2floatThe ending x-coordinate of the line.
y2floatThe ending y-coordinate of the line.
color1SKPaintThe primary color used for the dots in the line.
color2SKPaintThe secondary color used for the dots in the line. If set to null, the line will alternate between the primary color and transparency.
sizeintThe 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.