Method DrawDotLine
DrawDotLine(Graphics, float, float, float, float, Color, Color, int)
Draws a dotted line on the specified graphics context, alternating between two colors.
public static void DrawDotLine(Graphics dc, float x1, float y1, float x2, float y2, Color color1, Color color2, int size = 1)
Parameters
dcGraphicsThe Graphics 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.
color1ColorThe primary color used for the dots in the line.
color2ColorThe secondary color used for the dots in the line. If set to Empty, 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
Empty). The size of the dots is determined by the
size parameter.