ComponentOne Input for WinForms
C1.Win.C1Input.4.5.2 Assembly / C1.Framework.Drawing.Gdi.DeviceContexts Namespace / DeviceContext Class / InvertRectangle Method
A System.Drawing.Pointstructure that contains the logical coordinates of the rectangle to be inverted.

In This Topic
    InvertRectangle Method
    In This Topic
    Inverts a rectangle in a window by performing a logical NOT operation on the color values for each pixel in the rectangle's interior.
    Syntax
    'Declaration
     
    Public Overridable Sub InvertRectangle( _
       ByVal rectangle As System.Drawing.Rectangle _
    ) 
    public virtual void InvertRectangle( 
       System.Drawing.Rectangle rectangle
    )

    Parameters

    rectangle
    A System.Drawing.Pointstructure that contains the logical coordinates of the rectangle to be inverted.
    Exceptions
    ExceptionDescription
    Defines an exception class to handle the system error.
    Remarks
    On monochrome screens, InvertRectangle makes white pixels black and black pixels white. On color screens, the inversion depends on how colors are generated for the screen. Calling InvertRectangle twice for the same rectangle restores the display to its previous colors.
    See Also