change x scale

This commit is contained in:
Your Name
2025-12-13 00:42:20 +00:00
parent 4d2ef1a667
commit db764bbac0

View File

@@ -28,7 +28,7 @@ BPP = 4 # bytes per pixel (A,R,G,B)
# 2⃣ Margins & rectangle geometry (before slant)
# ----------------------------------------------------------------------
MARGIN_TOP = 100 # empty band at the very top
MARGIN_BOTTOM = 300 # empty band at the very bottom
MARGIN_BOTTOM = 150 # empty band at the very bottom
RECT_HEIGHT = FB_HEIGHT - MARGIN_TOP - MARGIN_BOTTOM # usable height = 400px
RECT_WIDTH = RECT_HEIGHT // 12 # ≈33px (aspect1:12)
@@ -47,7 +47,7 @@ LINE_THICKNESS = 5 # ≥1 pixel
# ----------------------------------------------------------------------
# You can generate these programmatically, read them from a file, etc.
ROT_ANGLES_DEG = [
90, 5, 10, 15, 20, 25,
0, 5, 10, 15, 20, 25,
30, 35, 40, 45, 50, 85
]
assert len(ROT_ANGLES_DEG) == 12, "Exactly 12 angles are required."
@@ -138,17 +138,17 @@ def build_framebuffer() -> bytearray:
# 5⃣ Coordinates of the four line endpoints
# --------------------------------------------------------------
# top edge
x0_top = cx - half_w
x0_top = cx - int(math.cos(angle_rad) * half_w)
y0_top = int(round(y_top + offset))
x1_top = cx + half_w
x1_top = cx + int(math.cos(angle_rad) * half_w)
y1_top = int(round(y_top - offset))
# bottom edge
x0_bot = cx - half_w
x0_bot = cx - int(math.cos(angle_rad) * half_w)
y0_bot = int(round(y_bottom - offset))
x1_bot = cx + half_w
x1_bot = cx + int(math.cos(angle_rad) * half_w)
y1_bot = int(round(y_bottom + offset))
# --------------------------------------------------------------