summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
authorPeter Hinch <peter@hinch.me.uk>2022-08-10 14:51:19 +0100
committerDamien George <damien@micropython.org>2022-08-19 23:31:28 +1000
commit42ec9703a07d1d0b55091f5557ff5f81c5134fb8 (patch)
tree374b5e1fe203469be8e020761ccfe047d8547d18 /docs/library
parent127b340438cddd55748e066cacbc1ab64131e232 (diff)
extmod/modframebuf: Add ellipse drawing method.
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/framebuf.rst18
1 files changed, 16 insertions, 2 deletions
diff --git a/docs/library/framebuf.rst b/docs/library/framebuf.rst
index 702461665..1e23abd0f 100644
--- a/docs/library/framebuf.rst
+++ b/docs/library/framebuf.rst
@@ -11,8 +11,8 @@ class FrameBuffer
-----------------
The FrameBuffer class provides a pixel buffer which can be drawn upon with
-pixels, lines, rectangles, text and even other FrameBuffer's. It is useful
-when generating output for displays.
+pixels, lines, rectangles, ellipses, text and even other FrameBuffers. It is
+useful when generating output for displays.
For example::
@@ -84,6 +84,20 @@ The following methods draw shapes onto the FrameBuffer.
The optional *f* parameter can be set to ``True`` to fill the rectangle.
Otherwise just a one pixel outline is drawn.
+.. method:: FrameBuffer.ellipse(x, y, xr, yr, c[, f, m])
+
+ Draw an ellipse at the given location. Radii *xr* and *yr* define the
+ geometry; equal values cause a circle to be drawn. The *c* parameter
+ defines the color.
+
+ The optional *f* parameter can be set to ``True`` to fill the ellipse.
+ Otherwise just a one pixel outline is drawn.
+
+ The optional *m* parameter enables drawing to be restricted to certain
+ quadrants of the ellipse. The LS four bits determine which quadrants are
+ to be drawn, with bit 0 specifying Q1, b1 Q2, b2 Q3 and b3 Q4. Quadrants
+ are numbered counterclockwise with Q1 being top right.
+
Drawing text
------------