From 387c966dc502f0195d0ea6eec49e871995e12077 Mon Sep 17 00:00:00 2001 From: Gerd Sattler <gerd@disroot.org> Date: Thu, 29 Aug 2019 21:37:36 +0200 Subject: [PATCH] fix(docs): fix display.py docs --- pycardium/modules/py/display.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pycardium/modules/py/display.py b/pycardium/modules/py/display.py index 7b51cef3..ef9cc87e 100644 --- a/pycardium/modules/py/display.py +++ b/pycardium/modules/py/display.py @@ -70,13 +70,13 @@ class Display: def print(self, text, *, fg=None, bg=None, posx=0, posy=0, font=FONT20): """ - Prints a string on the display. Font size is locked to 20px + Prints a string on the display. :param text: Text to print :param fg: Foreground color (expects RGB triple) :param bg: Background color (expects RGB triple) - :param posx: X-Position of the first character, 0 <= posx <= 160 - :param posy: Y-Position of the first character, 0 <= posy <= 80 + :param posx: X-Position of the first character, 0 <= posx <= 159 + :param posy: Y-Position of the first character, 0 <= posy <= 79 :param font: 0 <= font <= 4 (currently) selects a font Avaiable Fonts: @@ -106,8 +106,8 @@ class Display: """ Draws a pixel on the display - :param x: X coordinate, 0<= x <= 160 - :param y: Y coordinate, 0<= y <= 80 + :param x: X coordinate, 0<= x <= 159 + :param y: Y coordinate, 0<= y <= 79 :param col: color of the pixel (expects RGB tripple) """ @@ -130,10 +130,10 @@ class Display: """ Draws a line on the display. - :param xs: X start coordinate, 0 <= xs <= 160 - :param ys: Y start coordinate, 0 <= ys <= 80 - :param xe: X end coordinate, 0 <= xe <= 160 - :param ye: Y end coordinate, 0 <= ye <= 80 + :param xs: X start coordinate, 0 <= xs <= 159 + :param ys: Y start coordinate, 0 <= ys <= 79 + :param xe: X end coordinate, 0 <= xe <= 159 + :param ye: Y end coordinate, 0 <= ye <= 79 :param col: color of the line (expects RGB triple) :param dotted: whether the line should be dotted or not (questionable implementation: draws every other pixel white, draws @@ -150,10 +150,10 @@ class Display: """ Draws a rectangle on the display. - :param xs: X start coordinate, 0 <= xs <= 160 - :param ys: Y start coordinate, 0 <= ys <= 80 - :param xe: X end coordinate, 0 <= xe <= 160 - :param ye: Y end coordinate, 0 <= ye <= 80 + :param xs: X start coordinate, 0 <= xs <= 159 + :param ys: Y start coordinate, 0 <= ys <= 79 + :param xe: X end coordinate, 0 <= xe <= 159 + :param ye: Y end coordinate, 0 <= ye <= 79 :param col: color of the outline and fill (expects RGB triple) :param filled: whether the rectangle should be filled or not :param size: size of the individual pixels, ranges from 1 to 8 @@ -168,8 +168,8 @@ class Display: """ Draws a circle on the display. - :param x: center x coordinate, 0 <= x <= 160 - :param y: center y coordinate, 0 <= y <= 80 + :param x: center x coordinate, 0 <= x <= 159 + :param y: center y coordinate, 0 <= y <= 79 :param rad: radius :param col: color of the outline and fill (expects RGB triple) :param filled: whether the rectangle should be filled or not -- GitLab