Skip to content

Filled rectangle (fb_rect_fill)

What it does: Draws a filled rectangle at the specified position and dimension.

fb_rect_fill

Inputs

  • px: X coordinate of the upper left corner - integer.
  • py: Y coordinate of the upper left corner - integer.
  • sirka: rectangle width - integer.
  • vyska: rectangle height - integer.
  • col: Color (0 - black, 1 - white).

Output

  • None (statement block).

When to use it

  • When you want to create a background area for text or graphics.
  • For progress bars, status blocks and inverse highlighting.

Tips and pitfalls

  • The block draws a filled rectangle (fbuf.fill_rect), also suitable for erasing part of the screen.
  • oded_refresh is needed after framebuffer changes, otherwise the result will not be displayed.

Usage example

example_fb_rect_fill

Open example in ESP IDE

Generated Python example

fbuf.fill_rect(int(0), int(0), int(0), int(0), int(0))