From d5adf57bc65ca7eac00770ad427da9dbd9021bf6 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 28 Jul 2024 19:35:44 -0700 Subject: [PATCH] fix repr outside of class --- masque/shapes/text.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/masque/shapes/text.py b/masque/shapes/text.py index d19d6c5..598e986 100644 --- a/masque/shapes/text.py +++ b/masque/shapes/text.py @@ -191,6 +191,11 @@ class Text(RotatableImpl, Shape): return bounds + def __repr__(self) -> str: + rotation = f' r°{numpy.rad2deg(self.rotation):g}' if self.rotation != 0 else '' + mirrored = ' m{:d}' if self.mirrored else '' + return f'' + def get_char_as_polygons( font_path: str, @@ -278,8 +283,3 @@ def get_char_as_polygons( polygons = path.to_polygons() return polygons, advance - - def __repr__(self) -> str: - rotation = f' r°{numpy.rad2deg(self.rotation):g}' if self.rotation != 0 else '' - mirrored = ' m{:d}' if self.mirrored else '' - return f''