diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2022-08-12 16:34:51 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-08-19 23:31:28 +1000 |
| commit | 127b340438cddd55748e066cacbc1ab64131e232 (patch) | |
| tree | cc8e19807e66ad6bac526a86cb81bc41e6d36c89 /docs/library | |
| parent | af1f167820e685390d43dd7e250a0ffa078e138d (diff) | |
extmod/modframebuf: Add fill argument to rect().
We plan to add `ellipse` and `poly` methods, but rather than having to
implement a `fill_xyz` version of each, we can make them take an optional
fill argument. This commit add this to `rect` as a starting point.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/framebuf.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/library/framebuf.rst b/docs/library/framebuf.rst index 098ada815..702461665 100644 --- a/docs/library/framebuf.rst +++ b/docs/library/framebuf.rst @@ -77,12 +77,12 @@ The following methods draw shapes onto the FrameBuffer. methods draw horizontal and vertical lines respectively up to a given length. -.. method:: FrameBuffer.rect(x, y, w, h, c) -.. method:: FrameBuffer.fill_rect(x, y, w, h, c) +.. method:: FrameBuffer.rect(x, y, w, h, c[, f]) - Draw a rectangle at the given location, size and color. The `rect` - method draws only a 1 pixel outline whereas the `fill_rect` method - draws both the outline and interior. + Draw a rectangle at the given location, size and color. + + The optional *f* parameter can be set to ``True`` to fill the rectangle. + Otherwise just a one pixel outline is drawn. Drawing text ------------ |
