mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-12 05:42:59 +00:00
changed scale ChuckBuilds Sign
This commit is contained in:
@@ -62,6 +62,10 @@ def main():
|
|||||||
x = (matrix.width - text_width) // 2
|
x = (matrix.width - text_width) // 2
|
||||||
y = (matrix.height - text_height) // 2
|
y = (matrix.height - text_height) // 2
|
||||||
|
|
||||||
|
# Ensure text is fully visible
|
||||||
|
x = max(0, min(x, matrix.width - text_width))
|
||||||
|
y = max(0, min(y, matrix.height - text_height))
|
||||||
|
|
||||||
# Draw the text
|
# Draw the text
|
||||||
draw.text((x, y), text, font=font, fill=(255, 255, 255))
|
draw.text((x, y), text, font=font, fill=(255, 255, 255))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user