summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266/tutorial
diff options
context:
space:
mode:
authorgibbonsc <63733738+gibbonsc@users.noreply.github.com>2021-10-05 17:18:56 -0600
committerDamien George <damien@micropython.org>2021-11-25 23:34:19 +1100
commitde8dc4bad233e81ad3de5e7d5579cfebe045c809 (patch)
tree745242e9744c9585cc7a31142ef3d5441325b96d /docs/esp8266/tutorial
parent6259aa50ebdf148005ce237bbcc632f6f202227c (diff)
downloadmicropython-de8dc4bad233e81ad3de5e7d5579cfebe045c809.tar.gz
micropython-de8dc4bad233e81ad3de5e7d5579cfebe045c809.zip
docs/esp8266/tutorial: Fix comments of FrameBuffer examples.
The third and fourth parameters in display.rect() and display.fill_rect() are not x,y coordinates, but are instead width,height values. Update the comment after the example to show the correct x,y coordinates of the bottom right corner of each rectangle, respectively.
Diffstat (limited to 'docs/esp8266/tutorial')
-rw-r--r--docs/esp8266/tutorial/ssd1306.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/esp8266/tutorial/ssd1306.rst b/docs/esp8266/tutorial/ssd1306.rst
index 4dca82afc4..8651522e06 100644
--- a/docs/esp8266/tutorial/ssd1306.rst
+++ b/docs/esp8266/tutorial/ssd1306.rst
@@ -66,8 +66,8 @@ Subclassing FrameBuffer provides support for graphics primitives::
display.hline(0, 8, 4, 1) # draw horizontal line x=0, y=8, width=4, colour=1
display.vline(0, 8, 4, 1) # draw vertical line x=0, y=8, height=4, colour=1
display.line(0, 0, 127, 63, 1) # draw a line from 0,0 to 127,63
- display.rect(10, 10, 107, 43, 1) # draw a rectangle outline 10,10 to 107,43, colour=1
- display.fill_rect(10, 10, 107, 43, 1) # draw a solid rectangle 10,10 to 107,43, colour=1
+ display.rect(10, 10, 107, 43, 1) # draw a rectangle outline 10,10 to 117,53, colour=1
+ display.fill_rect(10, 10, 107, 43, 1) # draw a solid rectangle 10,10 to 117,53, colour=1
display.text('Hello World', 0, 0, 1) # draw some text at x=0, y=0, colour=1
display.scroll(20, 0) # scroll 20 pixels to the right