System.Windows.Forms.ControlPaint.FillReversibleRectangle Method

Draws a filled, reversible rectangle on the screen.

Syntax

public static void FillReversibleRectangle (System.Drawing.Rectangle rectangle, System.Drawing.Color backColor)

Parameters

rectangle
The System.Drawing.Rectangle that represents the dimensions of the rectangle to fill, in screen coordinates.
backColor
The System.Drawing.Color of the background behind the fill.

Remarks

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

The results of this method can be reversed by drawing the same rectangle again. Drawing a rectangle 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