def mirror(self, axis, centre): """ Return a mirrored copy of the shape @param axis: axis to mirror in @param centre: coordinate of mirror axis @return: Shape : the mirrored copy """ new = ArbitraryShape(set(Generator.reflect_points(self.points, axis, centre))) new.outline_gaps = set(Generator.reflect_points(self.outline_gaps, axis, centre)) return new
def mirror(self, axis, centre): new = RectShape(Generator.reflect_rect(self.rect, axis, centre)) new.outline_gaps = set(Generator.reflect_points(self.outline_gaps, axis, centre)) return new