Table of Contents

Method DrawDotLine

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

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

dc Graphics

The Graphics 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 Color

The primary color used for the dots in the line.

color2 Color

The secondary color used for the dots in the line. If set to Empty, 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 Empty). The size of the dots is determined by the size parameter.