ó
    oñ:i9  ã                   óh   • S SK JrJrJr  S SKJrJr  S SKJr  SS/r	 " S S\5      r
 " S S\
5      rg)	é    )ÚupdateBoundsÚpointInRectÚ	unionRect)ÚcalcCubicBoundsÚcalcQuadraticBounds)ÚBasePenÚ	BoundsPenÚControlBoundsPenc                   óF   • \ rS rSrSrSS jrS rS rS rS r	S r
S	 rS
rg)r
   é	   a©  Pen to calculate the "control bounds" of a shape. This is the
bounding box of all control points, so may be larger than the
actual bounding box if there are curves that don't have points
on their extremes.

When the shape has been drawn, the bounds are available as the
``bounds`` attribute of the pen object. It's a 4-tuple::

        (xMin, yMin, xMax, yMax).

If ``ignoreSinglePoints`` is True, single points are ignored.
c                 ó\   • [         R                  " X5        X l        U R                  5         g ©N)r   Ú__init__ÚignoreSinglePointsÚinit)ÚselfÚglyphSetr   s      Ú[/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/fontTools/pens/boundsPen.pyr   ÚControlBoundsPen.__init__   s   € Ü×Ò˜Ô(Ø"4ÔØ�	‰	�ó    c                 ó    • S U l         S U l        g r   )ÚboundsÚ_start)r   s    r   r   ÚControlBoundsPen.init   s   € ØˆŒØˆ�r   c                 óT   • Xl         U R                  (       d  U R                  5         g g r   )r   r   Ú
_addMoveTo©r   Úpts     r   Ú_moveToÚControlBoundsPen._moveTo    s   € ØŒØ×&×&Ø�O‰OÕð 'r   c                 ó¸   • U R                   c  g U R                  nU(       a  [        XR                   5      U l        OU R                   u  p#X#X#4U l        S U l         g r   )r   r   r   )r   r   ÚxÚys       r   r   ÚControlBoundsPen._addMoveTo%   sH   € Ø�;‰;ÑØØ—‘ˆÞÜ& v¯{©{Ó;ˆD�Kà—;‘;‰DˆAØ ˜,ˆDŒKØˆ�r   c                 óZ   • U R                  5         [        U R                  U5      U l        g r   )r   r   r   r   s     r   Ú_lineToÚControlBoundsPen._lineTo0   s   € Ø�‰ÔÜ" 4§;¡;°Ó3ˆ�r   c                 óŠ   • U R                  5         U R                  n[        XA5      n[        XB5      n[        XC5      nX@l        g r   ©r   r   r   ©r   Úbcp1Úbcp2r   r   s        r   Ú_curveToOneÚControlBoundsPen._curveToOne4   s8   € Ø�‰ÔØ—‘ˆÜ˜fÓ+ˆÜ˜fÓ+ˆÜ˜fÓ)ˆØ�r   c                 ót   • U R                  5         U R                  n[        X15      n[        X25      nX0l        g r   r)   ©r   Úbcpr   r   s       r   Ú_qCurveToOneÚControlBoundsPen._qCurveToOne<   s.   € Ø�‰ÔØ—‘ˆÜ˜fÓ*ˆÜ˜fÓ)ˆØ�r   )r   r   r   N)F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r   r&   r-   r2   Ú__static_attributes__© r   r   r
   r
   	   s*   † ñôò
òò
	ò4òõr   c                   ó$   • \ rS rSrSrS rS rSrg)r	   éD   ap  Pen to calculate the bounds of a shape. It calculates the
correct bounds even when the shape contains curves that don't
have points on their extremes. This is somewhat slower to compute
than the "control bounds".

When the shape has been drawn, the bounds are available as the
``bounds`` attribute of the pen object. It's a 4-tuple::

        (xMin, yMin, xMax, yMax)
c           	      óè   • U R                  5         U R                  n[        XC5      n[        X5      (       a  [        X$5      (       d%  [	        U[        U R                  5       XU5      5      nX@l        g r   )r   r   r   r   r   r   Ú_getCurrentPointr*   s        r   r-   ÚBoundsPen._curveToOneP   s\   € Ø�‰ÔØ—‘ˆÜ˜fÓ)ˆÜ˜4×(Ñ(´¸D×0IÑ0IÜØœ¨×(=Ñ(=Ó(?ÀÈRÓPóˆFð �r   c                 óÆ   • U R                  5         U R                  n[        X25      n[        X5      (       d$  [	        U[        U R                  5       X5      5      nX0l        g r   )r   r   r   r   r   r   r>   r0   s       r   r2   ÚBoundsPen._qCurveToOneZ   sQ   € Ø�‰ÔØ—‘ˆÜ˜fÓ)ˆÜ˜3×'Ñ'ÜØÔ+¨D×,AÑ,AÓ,CÀSÓMóˆFð �r   )r   N)r4   r5   r6   r7   r8   r-   r2   r9   r:   r   r   r	   r	   D   s   † ñ	òõr   N)ÚfontTools.misc.arrayToolsr   r   r   ÚfontTools.misc.bezierToolsr   r   ÚfontTools.pens.basePenr   Ú__all__r
   r	   r:   r   r   Ú<module>rF      s8   ðß JÑ Jß KÝ *ð Ð*Ð
+€ô8�wô 8ôvÐ õ r   