Skip to content
Snippets Groups Projects
Commit c5acfa67 authored by TilCreator's avatar TilCreator
Browse files

Add get_pixels_size

parent 13d64d0c
Branches
No related tags found
No related merge requests found
Pipeline #3685 passed
...@@ -9,6 +9,22 @@ FONT20 = 3 ...@@ -9,6 +9,22 @@ FONT20 = 3
FONT24 = 4 FONT24 = 4
def get_pixels_size(data):
min_x = max_x = data[0]
min_y = max_y = data[1]
for i in range(0, len(data), 4):
x = data[i]
y = data[i + 1]
min_x = min(x, min_x)
min_y = min(y, min_y)
max_x = max(x, max_x)
max_y = max(y, max_y)
return (min_x, min_y, max_x, max_y, max_x - min_x, max_y - min_y)
class Display: class Display:
""" """
The display class provides methods to allow the lcd display The display class provides methods to allow the lcd display
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment