feat(lcd): add fill and antialias support for line graphs#946
feat(lcd): add fill and antialias support for line graphs#946dogukanveziroglu wants to merge 4 commits into
Conversation
|
Antialiasing and the theme look both very nice together. Thank you for sharing. |
Yeah, you’re probably right. I considered this as a complete new line graph feature, so I submitted it as a single PR. I can split it into separate PRs if the owner prefers. |
|
Thank you for this PR, it is okay in one PR since the theme uses the new features you implemented. |
Oh, those files were actually for my own local Linux setup I accidentally included them in the PR :D Feel free to use the content for the wiki if you find it useful! |
- color.py: support RGBA colors with allow_alpha parameter
- lcd_comm.py: DisplayLineGraph gains fill, fill_color, antialias params
- fill: fills area under the line with polygon
- fill_color: RGBA color for fill (supports alpha transparency)
- antialias: 2x supersampling with LANCZOS downscale
- stats.py: display_themed_line_graph passes FILL, FILL_COLOR, ANTIALIAS
from theme YAML
Theme usage:
LINE_GRAPH:
FILL: True
FILL_COLOR: 50, 216, 243, 80
ANTIALIAS: True
Hi,
I've been using this project for my setup and wanted the line graphs to look more like Windows Task Manager / Linux Mission Center - with filled areas under the lines and smoother edges.
So I added three new optional parameters to LINE_GRAPH:
FILL: Fill the area under the lineFILL_COLOR: RGBA color with transparency supportANTIALIAS: 2x supersampling for smoother linesExample usage in theme.yaml:
Screenshots:
Before:
After: