Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Woazboat
firmware
Commits
85cc6e5a
Commit
85cc6e5a
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Plain Diff
Merge 'fix display.py docs'
See merge request
card10/firmware!277
parents
df50a941
387c966d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/py/display.py
+15
-15
15 additions, 15 deletions
pycardium/modules/py/display.py
with
15 additions
and
15 deletions
pycardium/modules/py/display.py
+
15
−
15
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment