# transformPen

class fontTools.pens.transformPen.TransformPen(outPen, transformation)

  Bases: `FilterPen`

  Pen that transforms all coordinates using a Affine transformation, and passes them to another pen.

  moveTo(pt)
  lineTo(pt)
  curveTo(*points)
  qCurveTo(*points)
  closePath()
  endPath()
  addComponent(glyphName, transformation)

class fontTools.pens.transformPen.TransformPointPen(outPointPen, transformation)

  Bases: `FilterPointPen`

  PointPen that transforms all coordinates using a Affine transformation, and passes them to another PointPen.

  For example:

      >>> from fontTools.pens.recordingPen import RecordingPointPen
      >>> rec = RecordingPointPen()
      >>> pen = TransformPointPen(rec, (2, 0, 0, 2, -10, 5))
      >>> v = iter(rec.value)
      >>> pen.beginPath(identifier="contour-0")
      >>> next(v)
      ('beginPath', (), {'identifier': 'contour-0'})

      >>> pen.addPoint((100, 100), "line")
      >>> next(v)
      ('addPoint', ((190, 205), 'line', False, None), {})

      >>> pen.endPath()
      >>> next(v)
      ('endPath', (), {})

      >>> pen.addComponent("a", (1, 0, 0, 1, -10, 5), identifier="component-0")
      >>> next(v)
      ('addComponent', ('a', <Transform [2 0 0 2 -30 15]>), {'identifier': 'component-0'})

  addPoint(pt, segmentType=None, smooth=False, name=None, **kwargs)
  addComponent(baseGlyphName, transformation, **kwargs)