[polygon] Only call rotate if necessary

This commit is contained in:
Jan Petykiewicz 2025-04-20 23:24:01 -07:00
parent c1bfee1ddd
commit 35e28acb89

View File

@ -107,7 +107,8 @@ class Polygon(Shape):
self.offset = offset self.offset = offset
self.repetition = repetition self.repetition = repetition
self.annotations = annotations if annotations is not None else {} self.annotations = annotations if annotations is not None else {}
self.rotate(rotation) if rotation:
self.rotate(rotation)
def __deepcopy__(self, memo: dict | None = None) -> 'Polygon': def __deepcopy__(self, memo: dict | None = None) -> 'Polygon':
memo = {} if memo is None else memo memo = {} if memo is None else memo