Ë
    ¡ëii  ã                   ó8   — d Z dZddlmZ ddlmZ  G d„ d«      Zy)z3.3.0zÂ
PDFPathObject is an efficient way to draw paths on a Canvas. Do not
instantiate directly, obtain one from the Canvas instead.

Progress Reports:
8.83, 2000-01-13, gmcm: created from pdfgen.py

é    )Úpdfgeom)Úfp_strc                   ól   — e Zd ZdZdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	dd	„Z
dd
„Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zy)ÚPDFPathObjecta:  Represents a graphic path.  There are certain 'modes' to PDF
    drawing, and making a separate object to expose Path operations
    ensures they are completed with no run-time overhead.  Ask
    the Canvas for a PDFPath with getNewPathObject(); moveto/lineto/
    curveto wherever you want; add whole shapes; and then add it back
    into the canvas with one of the relevant operators.

    Path objects are probably not long, so we pack onto one line

    the code argument allows a canvas to get the operations appended directly so
    avoiding the final getCode
    Nc                 óB   — |g f|d u    | _         | j                  | _        y ©N)Ú_codeÚ_init_code_appendÚ_code_append)ÚselfÚcodes     ú[/var/www/html/chat/reports/venv/lib/python3.12/site-packages/reportlab/pdfgen/pathobject.pyÚ__init__zPDFPathObject.__init__   s$   € Ø˜2�Y˜t t˜|Ñ,ˆŒ
Ø ×2Ñ2ˆÕó    c                 ó°   — |j                  d«      s|j                  d«      sJ d«       ‚| j                  j                  } |d«        ||«       || _        y )Nz mz rez%path must start with a moveto or rectÚn)Úendswithr	   Úappendr   )r   ÚcÚcode_appends      r   r
   zPDFPathObject._init_code_append#   sK   € Ø�z‰z˜$Ô 1§:¡:¨eÔ#4Ð]Ð6]Ó]Ð4Ø—j‘j×'Ñ'ˆÙ�CÔÙ�AŒØ'ˆÕr   c                 ó8   — dj                  | j                  «      S )z#pack onto one line; used internallyú )Újoinr	   ©r   s    r   ÚgetCodezPDFPathObject.getCode*   s   € à�x‰x˜Ÿ
™
Ó#Ð#r   c                 ó@   — | j                  dt        ||«      z  «       y )Nz%s m©r   r   ©r   ÚxÚys      r   ÚmoveTozPDFPathObject.moveTo.   ó   € Ø×Ñ˜&¤6¨!¨A£;Ñ.Õ/r   c                 ó@   — | j                  dt        ||«      z  «       y )Nz%s lr   r   s      r   ÚlineTozPDFPathObject.lineTo1   r"   r   c                 óH   — | j                  dt        ||||||«      z  «       y )Nz%s cr   )r   Úx1Úy1Úx2Úy2Úx3Úy3s          r   ÚcurveTozPDFPathObject.curveTo4   s$   € Ø×Ñ˜&¤6¨"¨b°"°b¸"¸bÓ#AÑAÕBr   c           
      óV   — | j                  t        j                  ||||||«      «       y)aÓ  Contributed to piddlePDF by Robert Kern, 28/7/99.
        Draw a partial ellipse inscribed within the rectangle x1,y1,x2,y2,
        starting at startAng degrees and covering extent degrees.   Angles
        start with 0 to the right (+x) and increase counter-clockwise.
        These should have x1<x2 and y1<y2.

        The algorithm is an elliptical generalization of the formulae in
        Jim Fitzsimmon's TeX tutorial <URL: http://www.tinaja.com/bezarc1.pdf>.N©Ú_curvesr   Ú	bezierArc©r   r&   r'   r(   r)   ÚstartAngÚextents          r   ÚarczPDFPathObject.arc7   s%   € ð 	�‰”W×&Ñ& r¨"¨b°°X¸vÓFÕGr   c           
      óX   — | j                  t        j                  ||||||«      d«       y)zmLike arc, but draws a line from the current point to
        the start if the start is not the current point.r$   Nr.   r1   s          r   ÚarcTozPDFPathObject.arcToC   s'   € ð 	�‰”W×&Ñ& r¨"¨b°°X¸vÓFÀxÕPr   c           	      óF   — | j                  dt        ||||f«      z  «       y)zAdds a rectangle to the pathz%s reNr   ©r   r   r    ÚwidthÚheights        r   ÚrectzPDFPathObject.rectH   s#   € à×Ñ˜'¤F¨A¨q°%¸Ð+@Ó$AÑAÕBr   c           
      ób   — | j                  t        j                  ||||z   ||z   dd«      «       y)zadds an ellipse to the pathr   ih  Nr.   r8   s        r   ÚellipsezPDFPathObject.ellipseL   s+   € à�‰”W×&Ñ& q¨!¨Q°©Y°q¸6±zÀ1ÀcÓJÕKr   c                 ó`   —  t        | |«      |d   d d Ž  |D ]  } | j                  |dd  Ž  Œ y )Nr   é   )Úgetattrr,   )r   ÚcurvesÚinitialÚcurves       r   r/   zPDFPathObject._curvesP   s@   € ØŒ��WÓ˜v a™y¨¨!˜}Ñ-Øò 	%ˆEØˆD�L‰L˜%  ˜)Ò$ñ	%r   c                 óN   — ||z
  }||z
  }d|z  x}}| j                  ||||«       y)zadds a circle to the pathr?   N)r=   )r   Úx_cenÚy_cenÚrr&   r'   r9   r:   s           r   ÚcirclezPDFPathObject.circleU   s4   € à�Q‰YˆØ�Q‰YˆØ˜1™Ðˆ�Ø�‰�R˜˜U FÕ+r   c           
      ó¦  — d}|||z   f}t        |«      t        |«      }}|||z   f}	t        |	«      t        |	«      }	}
t        |t        t        f«      �r|D �cg c]  }t        d|«      ‘Œ c}}t        |«      dk  r|dt        |«      z
  dgz  z  }| j                  ||d   z   |
«       | j                  ||d   z
  |
«       |d   dkD  r*||d   z  }| j                  ||z
  |
||
|z   ||
|d   z   «       | j                  ||	|d   z
  «       |d   dkD  r*||d   z  }| j                  ||	|z
  ||z
  |	||d   z
  |	«       | j                  ||d   z   |	«       |d   dkD  r*||d   z  }| j                  ||z   |	||	|z
  ||	|d   z
  «       | j                  ||
|d   z   «       |d   dkD  �r||d   z  }| j                  ||
|z   ||z   |
||d   z   |
«       nê||z  }| j                  ||z   |
«       | j                  ||z
  |
«       | j                  ||z
  |
||
|z   ||
|z   «       | j                  ||	|z
  «       | j                  ||	|z
  ||z
  |	||z
  |	«       | j                  ||z   |	«       | j                  ||z   |	||	|z
  ||	|z
  «       | j                  ||
|z   «       | j                  ||
|z   ||z   |
||z   |
«       | j                  «        yc c}w )z{Draws a rectangle with rounded corners. The corners are
        approximately quadrants of a circle, with the given radius.gW[±¿ìžÜ?r   é   r?   é   é   N)
ÚminÚmaxÚ
isinstanceÚlistÚtupleÚlenr!   r$   r,   Úclose)r   r   r    r9   r:   ÚradiusÚmÚxhiÚxloÚyhiÚylorG   Úts                r   Ú	roundRectzPDFPathObject.roundRect\   sì  € ð ˆØ��%‘ˆiˆÜ�s“8œS ›XˆSˆØ��&‘ˆjˆÜ�s“8œS ›XˆSˆÜ�fœd¤5˜\Õ*Ø#)Ö*˜a”�Q�q•Ò*ˆAÜ�1‹v�aŠx˜˜q¤ Q£™x¨!¨™nÑ,˜Ø�K‰K˜˜a ™d™
 CÔ(Ø�K‰K˜˜a ™d™
 CÔ(Ø�‰t�AŠvØ�a˜‘d‘F�Ø—‘˜S 1™W c¨3°°a±¸¸cÀAÀaÁD¹jÔIØ�K‰K˜˜S 1 Q¡4™ZÔ(Ø�‰t�AŠvØ�a˜‘d‘F�Ø—‘˜S #¨¡'¨3°©7°C¸¸qÀ¹t¹ÀSÔIØ�K‰K˜˜a ™d™
 CÔ(Ø�‰t�AŠvØ�a˜‘d‘F�Ø—‘˜S 1™W c¨3°°a±¸¸cÀAÀaÁD¹jÔIØ�K‰K˜˜S 1 Q¡4™ZÔ(Ø�‰t�A‹vØ�a˜‘d‘F�Ø—‘˜S #¨¡'¨3°©7°C¸¸qÀ¹t¹ÀSÕIð �F‘
ˆAØ�K‰K˜˜f™ cÔ*Ø�K‰K˜˜f™ cÔ*Ø�L‰L˜˜q™ # s¨C°!©G°S¸#À¹,ÔGØ�K‰K˜˜S 6™\Ô*Ø�L‰L˜˜c A™g s¨Q¡w°°S¸6±\À3ÔGØ�K‰K˜˜f™ cÔ*Ø�L‰L˜˜q™ # s¨C°!©G°S¸#À¹,ÔGØ�K‰K˜˜S 6™\Ô*Ø�L‰L˜˜c A™g s¨Q¡w°°S¸6±\À3ÔGØ�
‰
�ùò? +s   ÁKc                 ó&   — | j                  d«       y)z%draws a line back to where it startedÚhN)r   r   s    r   rS   zPDFPathObject.close‰   s   € à×Ñ˜#Õr   r   )r   éZ   )r!   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r
   r   r!   r$   r,   r4   r6   r;   r=   r/   rH   r[   rS   © r   r   r   r      sS   „ ñó3ò(ò$ò0ò0òCó
HóQò
CòLó%ò
,ò+óZr   r   N)Ú__version__rb   Úreportlab.pdfgenr   Úreportlab.lib.rl_accelr   r   rc   r   r   ú<module>rg      s'   ðð €ð	€õ %Ý )÷yò yr   