ó
    oñ:i  ã                   ód   • S SK JrJr  S SKJr  S SKJrJr  SS/r " S S\5      r	 " S S\5      r
g)	é    )ÚnoRoundÚotRound)Ú	Transform)Ú	FilterPenÚFilterPointPenÚRoundingPenÚRoundingPointPenc                   óR   ^ • \ rS rSrSr\\4U 4S jjrS rS r	S r
S rS rS	rU =r$ )
r   é	   a  
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U ]  U5        X l        X0l        g ©N©ÚsuperÚ__init__Ú	roundFuncÚtransformRoundFunc©ÚselfÚoutPenr   r   Ú	__class__s       €Ú]/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/fontTools/pens/roundingPen.pyr   ÚRoundingPen.__init__!   ó   ø€ Ü‰Ñ˜Ô Ø"ŒØ"4Õó    c                 ó†   • U R                   R                  U R                  US   5      U R                  US   5      45        g ©Nr   é   )Ú_outPenÚmoveTor   ©r   Úpts     r   r   ÚRoundingPen.moveTo&   ó3   € Ø�‰×Ñ˜TŸ^™^¨B¨q©EÓ2°D·N±NÀ2ÀaÁ5Ó4IÐJÕKr   c                 ó†   • U R                   R                  U R                  US   5      U R                  US   5      45        g r   )r   ÚlineTor   r    s     r   r%   ÚRoundingPen.lineTo)   r#   r   c                 óL   ^ • T R                   R                  " U 4S jU 5       6   g )Nc              3   ól   >#   • U  H)  u  pTR                  U5      TR                  U5      4v •  M+     g 7fr   ©r   ©Ú.0ÚxÚyr   s      €r   Ú	<genexpr>Ú&RoundingPen.curveTo.<locals>.<genexpr>.   ó*   øé € ÐHÂ¹¸ˆt�~‰~˜aÓ  $§.¡.°Ó"3Õ4Âùó   ƒ14)r   ÚcurveTo©r   Úpointss   ` r   r2   ÚRoundingPen.curveTo,   s   ø€ Ø�‰×ÒÜHÁÓHò	
r   c                 óL   ^ • T R                   R                  " U 4S jU 5       6   g )Nc              3   ól   >#   • U  H)  u  pTR                  U5      TR                  U5      4v •  M+     g 7fr   r)   r*   s      €r   r.   Ú'RoundingPen.qCurveTo.<locals>.<genexpr>3   r0   r1   )r   ÚqCurveTor3   s   ` r   r9   ÚRoundingPen.qCurveTo1   s   ø€ Ø�‰×ÒÜHÁÓHò	
r   c                 ó  • Uu  p4pVpxU R                   R                  U[        U R                  U5      U R                  U5      U R                  U5      U R                  U5      U R	                  U5      U R	                  U5      5      5        g r   ©r   ÚaddComponentr   r   r   )	r   Ú	glyphNameÚtransformationÚxxÚxyÚyxÚyyÚdxÚdys	            r   r=   ÚRoundingPen.addComponent6   s{   € Ø!/Ñˆ�˜Ø�‰×!Ñ!ØÜØ×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø—‘˜rÓ"Ø—‘˜rÓ"óõ
	
r   ©r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r   r%   r2   r9   r=   Ú__static_attributes__Ú__classcell__©r   s   @r   r   r   	   s4   ø† ñð. *1ÀW÷ 5ò
LòLò
ò

÷

ð 
r   c                   óJ   ^ • \ rS rSrSr\\4U 4S jjr SS jrSS jr	Sr
U =r$ )	r	   éE   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U ]  U5        X l        X0l        g r   r   r   s       €r   r   ÚRoundingPointPen.__init__c   r   r   c                 ó”   • U R                   R                  " U R                  US   5      U R                  US   5      44UUUUS.UD6  g )Nr   r   )ÚsegmentTypeÚsmoothÚnameÚ
identifier)r   ÚaddPointr   )r   r!   rU   rV   rW   rX   Úkwargss          r   rY   ÚRoundingPointPen.addPointh   sS   € ð 	�‰×ÒØ�^‰^˜B˜q™EÓ" D§N¡N°2°a±5Ó$9Ð:ð	
à#ØØØ!ñ	
ð ó	
r   c                 ó   • Uu  pVpxpšU R                   R                  " U[        U R                  U5      U R                  U5      U R                  U5      U R                  U5      U R	                  U	5      U R	                  U
5      5      4SU0UD6  g )NrX   r<   )r   ÚbaseGlyphNamer?   rX   rZ   r@   rA   rB   rC   rD   rE   s              r   r=   ÚRoundingPointPen.addComponentt   s�   € Ø!/Ñˆ�˜Ø�‰×!Ò!ØÜØ×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø×'Ñ'¨Ó+Ø—‘˜rÓ"Ø—‘˜rÓ"óñ	
ð "ð	
ð ó	
r   rG   )NFNNr   )rH   rI   rJ   rK   rL   r   r   r   rY   r=   rM   rN   rO   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	   © r   r   Ú<module>rd      s4   ðß 6Ý .ß >ð Ð,Ð
-€ô9
�)ô 9
ôx=
�~õ =
r   