From de8dc4bad233e81ad3de5e7d5579cfebe045c809 Mon Sep 17 00:00:00 2001 From: gibbonsc <63733738+gibbonsc@users.noreply.github.com> Date: Tue, 5 Oct 2021 17:18:56 -0600 Subject: [PATCH] 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. --- docs/esp8266/tutorial/ssd1306.rst | 4 ++-- 1 file 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