# lcd.drawFilledRectangle(x, y, w, h \[, flags])

Draws a solid rectangle from top left corner (x,y) of specified width and height

@status current Introduced in 2.0.0

### Parameters

* `x,y` (positive numbers) top left corner position
* `w` (number) width in pixels
* `h` (number) height in pixels
* `flags` (unsigned number) drawing flags

### Return value

none

## Examples

[lcd/drawFilledRectangle-example](https://raw.githubusercontent.com/opentx/lua-reference-guide/master/lcd/drawFilledRectangle-example.lua)

```lua
local function run()
  lcd.clear()
  lcd.drawText(10,22,"drawFilledRectangle()",DBLSIZE)
  lcd.drawFilledRectangle(5, 5, 103, 50, GREY_DEFAULT)
  lcd.drawFilledRectangle(152, 33, 50, 25, SOLID)
end

return{run=run}
```

![](https://2443226175-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRzpA5IZ0ZG8wYxAV6k%2Fsync%2F8312fa3f05a5b804f8084de71e4a705efe303fa0.png?generation=1611683701091190\&alt=media)
