
    h                        S SK JrJr  SS/r " S S\5      r " S S\5      r\S:X  a\  S SKJr  \" \" S5      S	5      r	\	R                  S
5        \	R                  S5        \	R                  SSSS
5        \	R                  5         gg)    )	FilterPenFilterPointPenTransformPenTransformPointPenc                   \   ^  \ rS rSrSrU 4S jrS rS rS rS r	S r
S	 rS
 rS rSrU =r$ )r      zcPen that transforms all coordinates using a Affine transformation,
and passes them to another pen.
c                    > [         [        U ]  U5        [        US5      (       d  SSKJn  U" U6 nX l        UR                  U l        / U l	        g)zThe 'outPen' argument is another pen object. It will receive the
transformed coordinates. The 'transformation' argument can either
be a six-tuple, or a fontTools.misc.transform.Transform object.
transformPointr   	TransformN)
superr   __init__hasattrfontTools.misc.transformr   _transformationr
   _transformPoint_stack)selfoutPentransformationr   	__class__s       M/var/www/html/env/lib/python3.13/site-packages/fontTools/pens/transformPen.pyr   TransformPen.__init__   sJ    
 	lD*62~'788:&7N--<<    c                 X    U R                   R                  U R                  U5      5        g N)_outPenmoveTor   r   pts     r   r   TransformPen.moveTo       D0045r   c                 X    U R                   R                  U R                  U5      5        g r   )r   lineTor   r   s     r   r$   TransformPen.lineTo   r"   r   c                 T    U R                   R                  " U R                  U5      6   g r   )r   curveTo_transformPointsr   pointss     r   r'   TransformPen.curveTo    s    d33F;<r   c                     US   c  U R                  US S 5      S /-   nOU R                  U5      nU R                  R                  " U6   g )N)r(   r   qCurveTor)   s     r   r.   TransformPen.qCurveTo#   sK    ":**6#2;74&@F**62Fv&r   c                 T    U R                   nU Vs/ s H
  o2" U5      PM     sn$ s  snf r   )r   )r   r*   r
   r    s       r   r(   TransformPen._transformPoints*   s*    ---34Vrr"V444s   %c                 8    U R                   R                  5         g r   )r   	closePathr   s    r   r3   TransformPen.closePath.   s     r   c                 8    U R                   R                  5         g r   )r   endPathr4   s    r   r7   TransformPen.endPath1   s    r   c                 p    U R                   R                  U5      nU R                  R                  X5        g r   r   	transformr   addComponent)r   	glyphNamer   s      r   r<   TransformPen.addComponent4   s*    --77G!!)<r   )r   r   r   )__name__
__module____qualname____firstlineno____doc__r   r   r$   r'   r.   r(   r3   r7   r<   __static_attributes____classcell__r   s   @r   r   r      s:    66='5!= =r   c                   <   ^  \ rS rSrSrU 4S jrSS jrS rSrU =r	$ )r   9   a  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'})
c                    > [         TU ]  U5        [        US5      (       d  SSKJn  U" U6 nX l        UR                  U l        g)zThe 'outPointPen' argument is another point pen object.
It will receive the transformed coordinates.
The 'transformation' argument can either be a six-tuple, or a
fontTools.misc.transform.Transform object.
r
   r   r   N)r   r   r   r   r   r   r
   r   )r   outPointPenr   r   r   s       r   r   TransformPointPen.__init__T   sA     	%~'788:&7N--<<r   c                 `    U R                   R                  " U R                  U5      X#U40 UD6  g r   )r   addPointr   )r   r    segmentTypesmoothnamekwargss         r   rM   TransformPointPen.addPointb   s.      $k4	
CI	
r   c                 t    U R                   R                  U5      nU R                  R                  " X40 UD6  g r   r:   )r   baseGlyphNamer   rQ   s       r   r<   TransformPointPen.addComponentg   s/    --77G!!-J6Jr   )r   r   )NFN)
r?   r@   rA   rB   rC   r   rM   r<   rD   rE   rF   s   @r   r   r   9   s    4=

K Kr   __main__)_TestPenN)   r   g      ?rX   ir   )r   r   )r   d   )2   K   )<   rZ   )rZ      )fontTools.pens.filterPenr   r   __all__r   r   r?   fontTools.pens.basePenrW   penr   r$   r'   r3    r   r   <module>rc      s    > .
//=9 /=d0K 0Kf z/
x~'=
>CJJvJJxKK(Hf5MMO r   