The fillrectangle works as expected and reaches all edges of the screen.
However, I would expect draw rectangle to outline the edge pixels but it only does the top and bottom edges, the sides are not changed.
If to we change to 96 to 95 we get the edges but the bottom line is raised one pixel.
from time import sleep from ssd1351 import Display, color565 from machine import Pin, SPI
Set up display for Pi Pico
spi = SPI(1, baudrate=13000000, sck=Pin(10), mosi=Pin(11)) display = Display(spi, dc=Pin(14), cs=Pin(9), rst=Pin(8))
Define some colours
red = color565(255,0,0) green = color565(0,255,0) blue = color565(0,0,255) white = color565(255,255,255) black = 0
display.clear() display.fill_rectangle(0,0,128,96,red) # Fill the screen red
display.draw_rectangle(0,0,128,96,green) # Problem line - Try changing 96 to 95
Turn corner pixels white - Works correctly
display.draw_pixel(0,0,white) display.draw_pixel(0,95,white) display.draw_pixel(127,0,white) display.draw_pixel(127,95,white)
The fillrectangle works as expected and reaches all edges of the screen. However, I would expect draw rectangle to outline the edge pixels but it only does the top and bottom edges, the sides are not changed. If to we change to 96 to 95 we get the edges but the bottom line is raised one pixel.