return self from Text's scale_by and rotate

This commit is contained in:
jan 2018-04-14 14:38:42 -07:00
parent eae57f7158
commit 4c535e6564

View File

@ -90,11 +90,13 @@ class Text(Shape):
return all_polygons return all_polygons
def rotate(self, theta: float): def rotate(self, theta: float) -> 'Text':
self.rotation += theta self.rotation += theta
return self
def scale_by(self, c: float): def scale_by(self, c: float) -> 'Text':
self.height *= c self.height *= c
return self
def normalized_form(self, norm_value: float) -> normalized_shape_tuple: def normalized_form(self, norm_value: float) -> normalized_shape_tuple:
return (type(self), self.string, self.font_path, self.layer), \ return (type(self), self.string, self.font_path, self.layer), \