G2D.InvertRect - boxgaming/qbjs GitHub Wiki
Inverts the colors of a specified rectangle.
Calling the method again in the same position will restore the image to its original color.
Syntax
G2D.InvertRect x&, y&, width&, height&[, fill~&]
Parameters
- The rectangle will be drawn with its top left corner at the position specified by the x& and y& parameters.
- The size of the rectangle is defined by the width& and height& parameters.
- The optional fill& parameter indicates whether a filled rectangle should be drawn. If not specified only the outline of the rectangle will be displayed.