fix: reduce alarm snapshot label obstruction
This commit is contained in:
@@ -189,6 +189,25 @@ class AlarmSnapshotTests(unittest.TestCase):
|
||||
dockerfile = (Path(__file__).resolve().parents[1] / "Dockerfile").read_text(encoding="utf-8")
|
||||
self.assertIn("fonts-noto-cjk", dockerfile)
|
||||
|
||||
def test_drawtext_label_style_stays_small_and_translucent(self) -> None:
|
||||
filter_text = alarm_snapshots.build_drawtext_filter(
|
||||
[
|
||||
alarm_snapshots.OverlayLabel(
|
||||
text="区域 1",
|
||||
fallback_text="R1",
|
||||
x=10,
|
||||
y=20,
|
||||
accent_rgb=(255, 196, 0),
|
||||
)
|
||||
],
|
||||
Path("/tmp/NotoSansCJK-Regular.ttc"),
|
||||
height=360,
|
||||
)
|
||||
|
||||
self.assertIn("fontsize=13", filter_text)
|
||||
self.assertIn("boxcolor=black@0.34", filter_text)
|
||||
self.assertIn("boxborderw=2", filter_text)
|
||||
|
||||
def test_capture_alert_snapshot_encodes_frame_with_configured_calibration_overlay(self) -> None:
|
||||
encoded_frames: list[Frame] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user