From 4c535e6564b99849bb7aaae9de344e54b49b9e1e Mon Sep 17 00:00:00 2001 From: jan Date: Sat, 14 Apr 2018 14:38:42 -0700 Subject: [PATCH] return self from Text's scale_by and rotate --- masque/shapes/text.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/masque/shapes/text.py b/masque/shapes/text.py index e645920..cd8340b 100644 --- a/masque/shapes/text.py +++ b/masque/shapes/text.py @@ -90,11 +90,13 @@ class Text(Shape): return all_polygons - def rotate(self, theta: float): + def rotate(self, theta: float) -> 'Text': self.rotation += theta + return self - def scale_by(self, c: float): + def scale_by(self, c: float) -> 'Text': self.height *= c + return self def normalized_form(self, norm_value: float) -> normalized_shape_tuple: return (type(self), self.string, self.font_path, self.layer), \