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>
This commit is contained in:
committed by
Damien George
parent
af1f167820
commit
127b340438
@@ -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
|
||||
------------
|
||||
|
||||
Reference in New Issue
Block a user