)EjrddlmZmZddlmZddlmZmZddgZGddeZ GddeZ dS) )noRoundotRound) Transform) FilterPenFilterPointPen RoundingPenRoundingPointPencFeZdZdZeeffd ZdZdZdZ dZ dZ xZ S)rag 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 cft|||_||_dSNsuper__init__ roundFunctransformRoundFuncselfoutPenrr __class__s LC:\PYTHON\MyICR_Suite\python\Lib\site-packages\fontTools/pens/roundingPen.pyrzRoundingPen.__init__!0    ""4c|j||d||dfdSNr)_outPenmoveTorrpts rrzRoundingPen.moveTo&C T^^BqE22DNN2a54I4IJKKKKKrc|j||d||dfdSr)rlineTorrs rr"zRoundingPen.lineTo)r rc>jjfd|DdS)Nc3rK|]1\}}||fV2dSr r.0xyrs r z&RoundingPen.curveTo...D H HAt~~a  $.."3"34 H H H H H Hr)rcurveTorpointss` rr,zRoundingPen.curveTo,s8  H H H H H H H    rc>jjfd|DdS)Nc3rK|]1\}}||fV2dSr r%r&s rr*z'RoundingPen.qCurveTo..3r+r)rqCurveTor-s` rr1zRoundingPen.qCurveTo1s8  H H H H H H H    rc V|\}}}}}}|j|t||||||||||||dSr r addComponentrrr) r glyphNametransformationxxxyyxyydxdys rr4zRoundingPen.addComponent6s!/BBB !!  ''++''++''++''++r""r""    r) __name__ __module__ __qualname____doc__rrrrr"r,r1r4 __classcell__rs@rrr s.*1W555555 LLLLLL             rc:eZdZdZeeffd Z ddZddZxZ 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 cft|||_||_dSr r rs rrzRoundingPointPen.__init__crrNFc |jj||d||dff||||d|dS)Nrr) segmentTypesmoothname identifier)raddPointr)rrrFrGrHrIkwargss rrJzRoundingPointPen.addPointhso   ^^BqE " "DNN2a5$9$9 : #!         rc L|\}}}}} } |jj|t|||||||||| || fd|i|dS)NrIr3) r baseGlyphNamer6rIrKr7r8r9r:r;r<s rr4zRoundingPointPen.addComponentts!/BBB! !  ''++''++''++''++r""r""    "  r)NFNNr ) r=r>r?r@rrrrJr4rArBs@rr r Es}:*1W555555 IM             rN) fontTools.misc.roundToolsrrfontTools.misc.transformrfontTools.pens.filterPenrr__all__rr rrrSs66666666......>>>>>>>> , -9 9 9 9 9 )9 9 9 x= = = = = ~= = = = = r