From 95384ff2e7d4dd5b382c8b480010d0ec123c293f Mon Sep 17 00:00:00 2001 From: ewuerger Date: Mon, 8 Jan 2024 10:47:02 +0100 Subject: [PATCH] fix(svg): Raise `NotImplementedError` when angle not `-90` --- capellambse/svg/drawing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/capellambse/svg/drawing.py b/capellambse/svg/drawing.py index fba427c21..7a9497c9d 100644 --- a/capellambse/svg/drawing.py +++ b/capellambse/svg/drawing.py @@ -294,6 +294,11 @@ def _draw_label(self, builder: LabelBuilder) -> None: if transform := getattr(builder.labelstyle, "transform", None): if match := re.search(RE_ROTATION, transform): + if match.group("angle") != "-90": + raise NotImplementedError( + "Angles other than -90 are not supported" + ) + x = float(match.group("x")) y = float(match.group("y")) if new_y := match.group("tspan_y"):