.FillRectangle()

back to FEHLCD

Description

This function is used to draw a rectangle starting from the specified top left corner and with the specified width and height. The rectangle will be filled with the color set by the most recent use of LCD.SetFontColor().

Syntax

.FillRectangle( int x, int y, int width, int height )

Parameters

x: integer pixel position in x direction for top left corner of rectangle (min 0, max 319)
y: integer pixel position in y direction for top left corner of rectangle (min 0, max 239)
width: integer number of pixels in x direction for width of rectangle
height: integer number of pixels in y direction for height of rectangle

Returns

None.

Examples

#include <FEHLCD.h>

int main(void)
{
    //Draw a filled rectangle in the middle of the screen
    LCD.SetFontColor(LIGHTGOLDENRODYELLOW);
    LCD.FillRectangle(140,100,40,40);
}

Leave a Reply

Your email address will not be published. Required fields are marked *