
    h                     D    S SK Jr  S SKJr  SS/r " S S\5      rSS jrg)	    )pairwise)ContourFilterPenreversedContourReverseContourPenc                   6   ^  \ rS rSrSrSU 4S jjrS rSrU =r$ )r      zFilter pen that passes outline data to another pen, but reversing
the winding direction of all contours. Components are simply passed
through unchanged.

Closed contours are reversed in such a way that the first point remains
the first point.
c                 0   > [         TU ]  U5        X l        g N)super__init__outputImpliedClosingLine)selfoutPenr   	__class__s      R/var/www/html/env/lib/python3.13/site-packages/fontTools/pens/reverseContourPen.pyr   ReverseContourPen.__init__   s     (@%    c                 ,    [        XR                  5      $ r
   )r   r   )r   contours     r   filterContourReverseContourPen.filterContour   s    w(E(EFFr   )r   F)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classcell__)r   s   @r   r   r      s    AG Gr   c           	   #   `  #    U (       d  g[        U 5      S:  d   S5       eU R                  5       S   nUS;   d   eUS:H  nU R                  S5      u  pEUS;   d
   SU-  5       eUS	   nUS
:X  a9  Ub   S5       eU (       a   S5       eUS   4[        [        USS	 5      5      -   S-   nU (       d  US:X  a  SnOSnXE4v   OU S	   u  pxUS	   n	U(       at  XE4v   Xi:w  a  SU	44v   U[        USS	 5      U4-   4U S	'   [        U 5      S:  a  U S   u  pOXxpU(       d+  U
S:X  a%  X[:w  a   U S	 U (       a  U[        USS	 5      U-   4U S	'   OXI44v   U[        USS	 5      U4-   4U S	'   [	        U SS9 H,  u  u  pu  pU[        [        USS	 5      5      US	   4-   4v   M.     U(       a  SOSS4v   g7f)zwGenerator that takes a list of pen's (operator, operands) tuples,
and yields them with the winding direction reversed.
N   zinvalid contourr   )endPath	closePathr#   )moveToqCurveToz invalid initial segment type: %rr%   z)off-curve only paths must end with 'None'z,only one qCurveTo allowed per off-curve pathr
   r$   FTlineTo)reverser"    )lenpoptuplereversedr   )r   r   contourTypeclosed	firstTypefirstPtsfirstOnCurvelastTypelastPtslastOnCurve
secondType	secondPtscurTypecurPts_nextPtss                   r   r   r      s(      w<!... ++-"K2222K'F!++a.I.. *Y6. B<LJ#P%PP#JJJ{QK>E(8Ab>*B$CCgM FF!!#BKbk%%*..'ws|)<)NO7|a(/
%
I )1I+
 )h.C
'/ws|1Dy1P&Q ^++#U73B<%8L?%JKGBK
 08/N+W|5&"+!6772;.HHH 0O  +Y
22s   F,F.Nr   )fontTools.misc.arrayToolsr   fontTools.pens.filterPenr   __all__r   r   r)   r   r   <module>r?      s-    . 5 1
2G( G"G3r   