Ejemplo n.º 1
0
 def scaled(self, factor, label = None):
     return Layer(
         groups = [
             tags.g(
                 self.groups,
                 transform = 'scale(%s)' % factor
             ),
         ],
         defs = self.defs,
         label = label,
     )
Ejemplo n.º 2
0
 def rotated(self, angle, label = None):
     return Layer(
         groups = [
             tags.g(
                 self.groups,
                 transform = 'rotate(%s)' % angle
             ),
         ],
         defs = self.defs,
         label = label,
     )
Ejemplo n.º 3
0
 def translated(self, start = None, x = None, y = None, label = None):
     if x is None or y is None:
         assert x is None and y is None
         assert start is not None
         x, y = start
     if label is None: label = self.label
     return Layer(
         groups = [
             tags.g(
                 self.groups,
                 transform = 'translate(%s, %s)' % (x, y)
             )
         ],
         defs = self.defs,
         label = label
     )