Ë
    £eh)  ã                   ód   — d dl mZmZ d dlmZ d dlmZmZ ddgZ G d„ de«      Z	 G d„ de«      Z
y)	é    )ÚnoRoundÚotRound)Ú	Transform)Ú	FilterPenÚFilterPointPenÚRoundingPenÚRoundingPointPenc                   óF   ‡ — e Zd ZdZeefˆ fd„	Zd„ Zd„ Zd„ Z	d„ Z
d„ Zˆ xZS )r   ag  
    Filter pen that rounds point coordinates and component XY offsets to integer. For
    rounding the component transform values, a separate round function can be passed to
    the pen.

    >>> from fontTools.pens.recordingPen import RecordingPen
    >>> recpen = RecordingPen()
    >>> roundpen = RoundingPen(recpen)
    >>> roundpen.moveTo((0.4, 0.6))
    >>> roundpen.lineTo((1.6, 2.5))
    >>> roundpen.qCurveTo((2.4, 4.6), (3.3, 5.7), (4.9, 6.1))
    >>> roundpen.curveTo((6.4, 8.6), (7.3, 9.7), (8.9, 10.1))
    >>> roundpen.addComponent("a", (1.5, 0, 0, 1.5, 10.5, -10.5))
    >>> recpen.value == [
    ...     ('moveTo', ((0, 1),)),
    ...     ('lineTo', ((2, 3),)),
    ...     ('qCurveTo', ((2, 5), (3, 6), (5, 6))),
    ...     ('curveTo', ((6, 9), (7, 10), (9, 10))),
    ...     ('addComponent', ('a', (1.5, 0, 0, 1.5, 11, -10))),
    ... ]
    True
    c                 ó@   •— t         ‰| �  |«       || _        || _        y ©N©ÚsuperÚ__init__Ú	roundFuncÚtransformRoundFunc©ÚselfÚoutPenr   r   Ú	__class__s       €úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/fontTools/pens/roundingPen.pyr   zRoundingPen.__init__!   ó   ø€ Ü‰Ñ˜Ô Ø"ˆŒØ"4ˆÕó    c                 ó†   — | j                   j                  | j                  |d   «      | j                  |d   «      f«       y ©Nr   é   )Ú_outPenÚmoveTor   ©r   Úpts     r   r   zRoundingPen.moveTo&   ó3   € Ø�‰×Ñ˜TŸ^™^¨B¨q©EÓ2°D·N±NÀ2ÀaÁ5Ó4IÐJÕKr   c                 ó†   — | j                   j                  | j                  |d   «      | j                  |d   «      f«       y r   )r   ÚlineTor   r   s     r   r"   zRoundingPen.lineTo)   r    r   c                 óJ   ‡ —  ‰ j                   j                  ˆ fd„|D «       Ž  y )Nc              3   óh   •K  — | ])  \  }}‰j                  |«      ‰j                  |«      f–— Œ+ y ­wr   ©r   ©Ú.0ÚxÚyr   s      €r   ú	<genexpr>z&RoundingPen.curveTo.<locals>.<genexpr>.   ó,   øè ø€ ÒH¹¸¸Aˆt�~‰~˜aÓ  $§.¡.°Ó"3Ô4ÑHùó   ƒ/2)r   ÚcurveTo©r   Úpointss   ` r   r-   zRoundingPen.curveTo,   s   ø€ Øˆ�‰×ÑÛHÀÔHò	
r   c                 óJ   ‡ —  ‰ j                   j                  ˆ fd„|D «       Ž  y )Nc              3   óh   •K  — | ])  \  }}‰j                  |«      ‰j                  |«      f–— Œ+ y ­wr   r%   r&   s      €r   r*   z'RoundingPen.qCurveTo.<locals>.<genexpr>3   r+   r,   )r   ÚqCurveTor.   s   ` r   r2   zRoundingPen.qCurveTo1   s   ø€ Øˆ�‰×ÑÛHÀÔHò	
r   c                 ó  — |\  }}}}}}| j                   j                  |t        | j                  |«      | j                  |«      | j                  |«      | j                  |«      | j	                  |«      | j	                  |«      «      «       y r   ©r   ÚaddComponentr   r   r   )	r   Ú	glyphNameÚtransformationÚxxÚxyÚyxÚyyÚdxÚdys	            r   r5   zRoundingPen.addComponent6   s�   € Ø!/ÑˆˆB��B˜˜BØ�‰×!Ñ!ØÜØ×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø—‘˜rÓ"Ø—‘˜rÓ"óõ
	
r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r"   r-   r2   r5   Ú__classcell__©r   s   @r   r   r   	   s/   ø„ ñð. *1ÀWõ 5ò
LòLò
ò

ö

r   c                   ó:   ‡ — e Zd ZdZeefˆ fd„	Z	 dd„Zdd„Zˆ xZ	S )r	   aŒ  
    Filter point pen that rounds point coordinates and component XY offsets to integer.
    For rounding the component scale values, a separate round function can be passed to
    the pen.

    >>> from fontTools.pens.recordingPen import RecordingPointPen
    >>> recpen = RecordingPointPen()
    >>> roundpen = RoundingPointPen(recpen)
    >>> roundpen.beginPath()
    >>> roundpen.addPoint((0.4, 0.6), 'line')
    >>> roundpen.addPoint((1.6, 2.5), 'line')
    >>> roundpen.addPoint((2.4, 4.6))
    >>> roundpen.addPoint((3.3, 5.7))
    >>> roundpen.addPoint((4.9, 6.1), 'qcurve')
    >>> roundpen.endPath()
    >>> roundpen.addComponent("a", (1.5, 0, 0, 1.5, 10.5, -10.5))
    >>> recpen.value == [
    ...     ('beginPath', (), {}),
    ...     ('addPoint', ((0, 1), 'line', False, None), {}),
    ...     ('addPoint', ((2, 3), 'line', False, None), {}),
    ...     ('addPoint', ((2, 5), None, False, None), {}),
    ...     ('addPoint', ((3, 6), None, False, None), {}),
    ...     ('addPoint', ((5, 6), 'qcurve', False, None), {}),
    ...     ('endPath', (), {}),
    ...     ('addComponent', ('a', (1.5, 0, 0, 1.5, 11, -10)), {}),
    ... ]
    True
    c                 ó@   •— t         ‰| �  |«       || _        || _        y r   r   r   s       €r   r   zRoundingPointPen.__init__c   r   r   c                 ó”   —  | j                   j                  | j                  |d   «      | j                  |d   «      ff||||dœ|¤Ž y )Nr   r   )ÚsegmentTypeÚsmoothÚnameÚ
identifier)r   ÚaddPointr   )r   r   rG   rH   rI   rJ   Úkwargss          r   rK   zRoundingPointPen.addPointh   sU   € ð 	ˆ�‰×ÑØ�^‰^˜B˜q™EÓ" D§N¡N°2°a±5Ó$9Ð:ð	
à#ØØØ!ñ	
ð ó	
r   c                 ó&  — |\  }}}}}	}
 | j                   j                  d|t        | j                  |«      | j                  |«      | j                  |«      | j                  |«      | j	                  |	«      | j	                  |
«      «      |dœ|¤Ž y )N)ÚbaseGlyphNamer7   rJ   © r4   )r   rN   r7   rJ   rL   r8   r9   r:   r;   r<   r=   s              r   r5   zRoundingPointPen.addComponentt   s—   € Ø!/ÑˆˆB��B˜˜BØ!ˆ�‰×!Ñ!ð 	
Ø'Ü$Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø—‘˜rÓ"Ø—‘˜rÓ"óð "ñ	
ð ó	
r   )NFNNr   )
r>   r?   r@   rA   r   r   r   rK   r5   rB   rC   s   @r   r	   r	   E   s%   ø„ ñð: *1ÀWõ 5ð IMó

÷
r   N)ÚfontTools.misc.roundToolsr   r   ÚfontTools.misc.transformr   ÚfontTools.pens.filterPenr   r   Ú__all__r   r	   rO   r   r   ú<module>rT      s4   ðß 6Ý .ß >ð Ð,Ð
-€ô9
�)ô 9
ôx=
�~õ =
r   