System.Windows.Forms.ControlPaint.DrawReversibleLine Method

Draws a reversible line on the screen within the specified starting and ending points and with the specified background color.

Syntax

public static void DrawReversibleLine (System.Drawing.Point start, System.Drawing.Point end, System.Drawing.Color backColor)

Parameters

start
The starting System.Drawing.Point of the line, in screen coordinates.
end
The ending System.Drawing.Point of the line, in screen coordinates.
backColor
The System.Drawing.Color of the background behind the line.

Remarks

The backColor parameter is used to calculate the fill color of the line so that it is always visible against the background.

The results of this method can be reversed by drawing the same line again. Drawing a line using this method is similar to inverting a region of the screen, except that it provides better performance for a wider variety of colors.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0