Skip to content
Snippets Groups Projects
Commit 85cc6e5a authored by rahix's avatar rahix
Browse files

Merge 'fix display.py docs'

See merge request !277
parents df50a941 387c966d
Branches
No related tags found
No related merge requests found
...@@ -70,13 +70,13 @@ class Display: ...@@ -70,13 +70,13 @@ class Display:
def print(self, text, *, fg=None, bg=None, posx=0, posy=0, font=FONT20): 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 text: Text to print
:param fg: Foreground color (expects RGB triple) :param fg: Foreground color (expects RGB triple)
:param bg: Background color (expects RGB triple) :param bg: Background color (expects RGB triple)
:param posx: X-Position of the first character, 0 <= posx <= 160 :param posx: X-Position of the first character, 0 <= posx <= 159
:param posy: Y-Position of the first character, 0 <= posy <= 80 :param posy: Y-Position of the first character, 0 <= posy <= 79
:param font: 0 <= font <= 4 (currently) selects a font :param font: 0 <= font <= 4 (currently) selects a font
Avaiable Fonts: Avaiable Fonts:
...@@ -106,8 +106,8 @@ class Display: ...@@ -106,8 +106,8 @@ class Display:
""" """
Draws a pixel on the display Draws a pixel on the display
:param x: X coordinate, 0<= x <= 160 :param x: X coordinate, 0<= x <= 159
:param y: Y coordinate, 0<= y <= 80 :param y: Y coordinate, 0<= y <= 79
:param col: color of the pixel (expects RGB tripple) :param col: color of the pixel (expects RGB tripple)
""" """
...@@ -130,10 +130,10 @@ class Display: ...@@ -130,10 +130,10 @@ class Display:
""" """
Draws a line on the display. Draws a line on the display.
:param xs: X start coordinate, 0 <= xs <= 160 :param xs: X start coordinate, 0 <= xs <= 159
:param ys: Y start coordinate, 0 <= ys <= 80 :param ys: Y start coordinate, 0 <= ys <= 79
:param xe: X end coordinate, 0 <= xe <= 160 :param xe: X end coordinate, 0 <= xe <= 159
:param ye: Y end coordinate, 0 <= ye <= 80 :param ye: Y end coordinate, 0 <= ye <= 79
:param col: color of the line (expects RGB triple) :param col: color of the line (expects RGB triple)
:param dotted: whether the line should be dotted or not :param dotted: whether the line should be dotted or not
(questionable implementation: draws every other pixel white, draws (questionable implementation: draws every other pixel white, draws
...@@ -150,10 +150,10 @@ class Display: ...@@ -150,10 +150,10 @@ class Display:
""" """
Draws a rectangle on the display. Draws a rectangle on the display.
:param xs: X start coordinate, 0 <= xs <= 160 :param xs: X start coordinate, 0 <= xs <= 159
:param ys: Y start coordinate, 0 <= ys <= 80 :param ys: Y start coordinate, 0 <= ys <= 79
:param xe: X end coordinate, 0 <= xe <= 160 :param xe: X end coordinate, 0 <= xe <= 159
:param ye: Y end coordinate, 0 <= ye <= 80 :param ye: Y end coordinate, 0 <= ye <= 79
:param col: color of the outline and fill (expects RGB triple) :param col: color of the outline and fill (expects RGB triple)
:param filled: whether the rectangle should be filled or not :param filled: whether the rectangle should be filled or not
:param size: size of the individual pixels, ranges from 1 to 8 :param size: size of the individual pixels, ranges from 1 to 8
...@@ -168,8 +168,8 @@ class Display: ...@@ -168,8 +168,8 @@ class Display:
""" """
Draws a circle on the display. Draws a circle on the display.
:param x: center x coordinate, 0 <= x <= 160 :param x: center x coordinate, 0 <= x <= 159
:param y: center y coordinate, 0 <= y <= 80 :param y: center y coordinate, 0 <= y <= 79
:param rad: radius :param rad: radius
:param col: color of the outline and fill (expects RGB triple) :param col: color of the outline and fill (expects RGB triple)
:param filled: whether the rectangle should be filled or not :param filled: whether the rectangle should be filled or not
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment