change x scale
This commit is contained in:
@@ -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 = 400 px
|
||||
RECT_WIDTH = RECT_HEIGHT // 12 # ≈ 33 px (aspect 1 : 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 end‑points
|
||||
# --------------------------------------------------------------
|
||||
# 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))
|
||||
|
||||
# --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user