Created
June 2, 2015 10:49
-
-
Save adusak/256dbd56c0555ce877ff to your computer and use it in GitHub Desktop.
Polygon Group Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PolygonGroup: | |
def __init__(self, polygons=None): | |
self.polygons = [] | |
if polygons is not None: | |
self.polygons.extend(polygons) | |
def apply_transformation(self, transformation): | |
list(map(lambda x: x.apply_transformation(transformation), self.polygons)) | |
def draw_to_svg(self, svg): | |
list(map(lambda x: x.draw_to_svg(svg), self.polygons)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment