+
    i                     f    ^ RI HtHt ^ RIHt ^ RIHtHt RR.t ! R R]4      t	 ! R R]4      t
R# )	    )noRoundotRound)	Transform)	FilterPenFilterPointPenRoundingPenRoundingPointPenc                   \   a a ] tR t^	t oRt]]3V 3R lltR tR t	R t
R tR tRtVtV ;t# )	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                >   < \         SV `  V4       W n        W0n        R # Nsuper__init__	roundFunctransformRoundFuncselfoutPenr   r   	__class__s   &&&&z/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/fontTools/pens/roundingPen.pyr   RoundingPen.__init__!        ""4    c                    V P                   P                  V P                  V^ ,          4      V P                  V^,          4      34       R# r   N)_outPenmoveTor   r   pts   &&r   r   RoundingPen.moveTo&   3    T^^BqE2DNN2a54IJKr   c                    V P                   P                  V P                  V^ ,          4      V P                  V^,          4      34       R# r   )r   lineTor   r   s   &&r   r#   RoundingPen.lineTo)   r!   r   c                P   a  S P                   P                  ! V 3R  lV 4       !   R# )c              3   l   <"   T F)  w  rSP                  V4      SP                  V4      3x  K+  	  R # 5ir   r   .0xyr   s   &  r   	<genexpr>&RoundingPen.curveTo.<locals>.<genexpr>.   *     Ht~~a $.."34   14N)r   curveTor   pointss   f*r   r0   RoundingPen.curveTo,   s    HH	
r   c                P   a  S P                   P                  ! V 3R  lV 4       !   R# )c              3   l   <"   T F)  w  rSP                  V4      SP                  V4      3x  K+  	  R # 5ir   r'   r(   s   &  r   r,   'RoundingPen.qCurveTo.<locals>.<genexpr>3   r.   r/   N)r   qCurveTor1   s   f*r   r7   RoundingPen.qCurveTo1   s    HH	
r   c                   Vw  r4rVrxV P                   P                  V\        V P                  V4      V P                  V4      V P                  V4      V P                  V4      V P	                  V4      V P	                  V4      4      4       R # 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#   r0   r7   r;   __static_attributes____classdictcell____classcell__r   __classdict__s   @@r   r   r   	   s6     . *1W 5
LL




 
r   c                   R   a a ] tR t^Et oRt]]3V 3R lltRR ltRR lt	Rt
VtV ;t# )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                >   < \         SV `  V4       W n        W0n        R # r   r   r   s   &&&&r   r   RoundingPointPen.__init__c   r   r   c                    V P                   P                  ! V P                  V^ ,          4      V P                  V^,          4      33RVRVRVRV/VB  R# )r   segmentTypesmoothname
identifierN)r   addPointr   )r   r   rT   rU   rV   rW   kwargss   &&&&&&,r   rX   RoundingPointPen.addPointh   sh     	^^BqE"DNN2a5$9:	
#	
 	
 		

 "	
 	
r   c                "   Vw  rVrxrV P                   P                  ! V\        V P                  V4      V P                  V4      V P                  V4      V P                  V4      V P	                  V	4      V P	                  V
4      4      3R V/VB  R# )rW   Nr:   )r   baseGlyphNamer=   rW   rY   r>   r?   r@   rA   rB   rC   s   &&&&,      r   r;   RoundingPointPen.addComponentt   s    !/!!''+''+''+''+r"r"	
 "	
 	
r   rE   )NFNNr   )rF   rG   rH   rI   rJ   r   r   r   rX   r;   rK   rL   rM   rN   s   @@r   r	   r	   E   s%     : *1W 5



 
r   N)fontTools.misc.roundToolsr   r   fontTools.misc.transformr   fontTools.pens.filterPenr   r   __all__r   r	    r   r   <module>rc      s4    6 . > ,
-9
) 9
x=
~ =
r   