.filledrectangle Method

Function:

Draws a filled rectangle.

Syntax:

lcd.filledrectangle(x1 as word, y1 as word, x2 as word, y2 as word)

Returns:

---

See Also:

Lines, Rectangles, and Fills, Working With Pixels and Colors, lcd.line, lcd.verline, lcd.horline, lcd.rectangle, lcd.fill


Part

Description

x1

X coordinate of the top-left point of the image position on the screen. Value range is 0 to lcd.width - 1.

y1

Y coordinate of the top-left point of the image position on the screen. Value range is 0 to lcd.height - 1.

x2

X coordinate of the second point. Value range is 0 to lcd.width - 1.

y2

Y coordinate of the second point. Value range is 0 to lcd.height - 1.


Details

The border is drawn with the specified line width (lcd.linewidth) and "pen" color (lcd.forecolor). The rectangle is then filled using the background color (lcd.backcolor). Setting lcd.linewidth to 0 will create a rectangle with no border — basically, a filled area.

The display panel must be enabled (lcd.enabled = 1 — YES) for this method to work.


.filledrectangle Method

Details