Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Haun
firmware
Commits
387c966d
Commit
387c966d
authored
Aug 29, 2019
by
Gerd
Browse files
fix(docs): fix display.py docs
parent
c7b7bc84
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycardium/modules/py/display.py
View file @
387c966d
...
...
@@ -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 <= 1
60
:param posy: Y-Position of the first character, 0 <= posy <=
80
:param posx: X-Position of the first character, 0 <= posx <= 1
59
: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 <= 1
60
:param y: Y coordinate, 0<= y <=
80
:param x: X coordinate, 0<= x <= 1
59
: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 <= 1
60
:param ys: Y start coordinate, 0 <= ys <=
80
:param xe: X end coordinate, 0 <= xe <= 1
60
:param ye: Y end coordinate, 0 <= ye <=
80
:param xs: X start coordinate, 0 <= xs <= 1
59
:param ys: Y start coordinate, 0 <= ys <=
79
:param xe: X end coordinate, 0 <= xe <= 1
59
: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 <= 1
60
:param ys: Y start coordinate, 0 <= ys <=
80
:param xe: X end coordinate, 0 <= xe <= 1
60
:param ye: Y end coordinate, 0 <= ye <=
80
:param xs: X start coordinate, 0 <= xs <= 1
59
:param ys: Y start coordinate, 0 <= ys <=
79
:param xe: X end coordinate, 0 <= xe <= 1
59
: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 <= 1
60
:param y: center y coordinate, 0 <= y <=
80
:param x: center x coordinate, 0 <= x <= 1
59
: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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment