Files
StarPilot/openpilot/starpilot/ui/home_geometry.py
T
firestar5683 aaac7a6733 Shared settings and onroad views
Present saved configuration and live driving state through native Small and Big UI layouts. Support per-field tune resets, movable widgets, camera availability, and a unified speed card while preserving decision-bound actions.
2026-10-03 22:34:37 +00:00

12 lines
550 B
Python

"""Native geometry adjustments for the protected Home presentation."""
import pyray as rl
def outside_rounded_border(rect, roundness, segments, thickness, color):
# Raylib 6 offsets outline vertices by half a pixel. Keep the intended corner
# radius while compensating for that offset at both edges.
shortest = min(rect.width, rect.height)
expanded = rl.Rectangle(rect.x - 0.5, rect.y - 0.5, rect.width + 1, rect.height + 1)
rl.draw_rectangle_rounded_lines_ex(expanded, roundness * shortest / (shortest + 1), segments, thickness, color)