Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PetePriority
firmware
Commits
85cc6e5a
Commit
85cc6e5a
authored
Aug 30, 2019
by
Rahix
Browse files
Options
Browse Files
Download
Plain Diff
Merge 'fix display.py docs'
See merge request
card10/firmware!277
parents
df50a941
387c966d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
pycardium/modules/py/display.py
pycardium/modules/py/display.py
+15
-15
No files found.
pycardium/modules/py/display.py
View file @
85cc6e5a
...
...
@@ -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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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