mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
fix: add default y-coordinate in draw_text method
This commit is contained in:
@@ -254,6 +254,10 @@ class DisplayManager:
|
||||
text_width = width
|
||||
x = (self.matrix.width - text_width) // 2
|
||||
|
||||
# Set default y position if not provided
|
||||
if y is None:
|
||||
y = 0 # Default to top of display
|
||||
|
||||
# Draw the text
|
||||
if isinstance(current_font, freetype.Face):
|
||||
self._draw_bdf_text(text, x, y, color)
|
||||
|
||||
Reference in New Issue
Block a user