Ë
    ‹`gý)  ã                   óÎ   — d dl mZ d dl mZ ddddœZddd	d
œZ G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z	 G d„ de«      Z
 G d„ de«      Z G d„ de«      Zy)é    ©Ústrlist©Ú	is_stringÚxMidÚxMinÚxMax)ÚcenterÚleftÚrightÚYMidÚYMinÚYMax)ÚmiddleÚtopÚbottomc                   ó&   — e Zd ZdZdd„Zd„ Zdd„Zy)ÚViewBoxaô   The **ViewBox** mixin provides the ability to specify that a
    given set of graphics stretch to fit a particular container element.

    The value of the **viewBox** attribute is a list of four numbers
    **min-x**, **min-y**, **width** and **height**, separated by whitespace
    and/or a comma, which specify a rectangle in **user space** which should
    be mapped to the bounds of the viewport established by the given element,
    taking into account attribute **preserveAspectRatio**.

    c                 ó(   — t        ||||g«      | d<   y)a~   Specify a rectangle in **user space** (no units allowed) which
        should be mapped to the bounds of the viewport established by the
        given element.

        :param number minx: left border of the viewBox
        :param number miny: top border of the viewBox
        :param number width: width of the viewBox
        :param number height: height of the viewBox

        ÚviewBoxNr   )ÚselfÚminxÚminyÚwidthÚheights        ú`/workspace/moltex-experiments/.pixi/envs/default/lib/python3.12/site-packages/svgwrite/mixins.pyÚviewboxzViewBox.viewbox   s   € ô " D¨$°°vÐ#>Ó@ˆˆYŠó    c                 ó   — d| d<   y)zh Stretch viewBox in x and y direction to fill viewport, does not
        preserve aspect ratio.
        ÚnoneÚpreserveAspectRatioN© )r   s    r   ÚstretchzViewBox.stretch'   s   € ð '-ˆÐ"Ò#r   c                 ót   — | j                   r|dvrt        d|z  «      ‚t        |   ›t        |   ›d|›�| d<   y)a   Set the **preserveAspectRatio** attribute.

        :param string horiz: horizontal alignment ``'left | center | right'``
        :param string vert: vertical alignment ``'top | middle | bottom'``
        :param string scale: scale method ``'meet | slice'``

        ============= =======================================================
        Scale methods Description
        ============= =======================================================
        ``'meet'``    preserve aspect ration and zoom to limits of viewBox
        ``'slice'``   preserve aspect ration and viewBox touch viewport on
                      all bounds, viewBox will extend beyond the bounds of
                      the viewport
        ============= =======================================================

        )ÚmeetÚslicezInvalid scale parameter '%s'Ú r!   N)ÚdebugÚ
ValueErrorÚ_horizÚ_vert)r   ÚhorizÚvertÚscales       r   ÚfitzViewBox.fit-   s>   € ð" �:Š:˜%Ð'8Ñ8ÜÐ;¸eÑCÓDÐDÜ39¸%²=ÄÀtÃÉeÐ&TˆÐ"Ò#r   N)r   r   r   r   )r
   r   r%   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r/   r"   r   r   r   r      s   „ ñ	óAò-ôUr   r   c                   óD   — e Zd ZdZdZdd„Zdd„Zdd„Zd„ Zd„ Z	d	„ Z
d
„ Zy)Ú	Transforma|   The **Transform** mixin operates on the **transform** attribute.
    The value of the **transform** attribute is a `<transform-list>`, which
    is defined as a list of transform definitions, which are applied in the
    order provided. The individual transform definitions are separated by
    whitespace and/or a comma. All coordinates are **user
    space coordinates**.

    Ú	transformNc                 óB   — | j                  dt        ||g«      z  «       y)z÷
        Specifies a translation by **tx** and **ty**. If **ty** is not provided,
        it is assumed to be zero.

        :param number tx: user coordinate - no units allowed
        :param number ty: user coordinate - no units allowed
        ztranslate(%s)N©Ú_add_transformationr   )r   ÚtxÚtys      r   Ú	translatezTransform.translateL   s    € ð 	× Ñ  ´7¸RÀ¸HÓ3FÑ!FÕGr   c                 óB   — | j                  dt        ||g«      z  «       y)ac  
        Specifies a rotation by **angle** degrees about a given point.
        If optional parameter **center** are not supplied, the rotate is
        about the origin of the current user coordinate system.

        :param number angle: rotate-angle in degrees
        :param 2-tuple center: rotate-center as user coordinate - no units allowed

        z
rotate(%s)Nr8   )r   Úangler
   s      r   ÚrotatezTransform.rotateV   s    € ð 	× Ñ  ´¸%À¸Ó0JÑ!JÕKr   c                 óB   — | j                  dt        ||g«      z  «       y)a  
        Specifies a scale operation by **sx** and **sy**. If **sy** is not
        provided, it is assumed to be equal to **sx**.

        :param number sx: scalar factor x-axis, no units allowed
        :param number sy: scalar factor y-axis, no units allowed

        z	scale(%s)Nr8   )r   ÚsxÚsys      r   r.   zTransform.scaleb   s    € ð 	× Ñ  ¬w¸¸B°xÓ/@Ñ!@ÕAr   c                 ó,   — | j                  d|z  «       y)z‚ Specifies a skew transformation along the x-axis.

        :param number angle: skew-angle in degrees, no units allowed

        z	skewX(%s)N©r9   ©r   r>   s     r   ÚskewXzTransform.skewXm   ó   € ð 	× Ñ  ¨uÑ!4Õ5r   c                 ó,   — | j                  d|z  «       y)z‚ Specifies a skew transformation along the y-axis.

        :param number angle: skew-angle in degrees, no units allowed

        z	skewY(%s)NrD   rE   s     r   ÚskewYzTransform.skewYu   rG   r   c                 óJ   — | j                  dt        ||||||g«      z  «       y )Nz
matrix(%s)r8   )r   ÚaÚbÚcÚdÚeÚfs          r   ÚmatrixzTransform.matrix}   s'   € Ø× Ñ  ´¸!¸QÀÀ1ÀaÈÐ9KÓ0MÑ!MÕNr   c                 ó”   — | j                   j                  | j                  d«      }|›d|›�j                  «       | | j                  <   y )NÚ r'   )ÚattribsÚgetÚtransformnameÚstrip)r   Únew_transformÚold_transforms      r   r9   zTransform._add_transformation€   s<   € ØŸ™×(Ñ(¨×);Ñ);¸RÓ@ˆÚ/<¹mÐ$L×#SÑ#SÓ#UˆˆT×ÑÒ r   )N)r0   r1   r2   r3   rV   r<   r?   r.   rF   rI   rQ   r9   r"   r   r   r5   r5   B   s6   „ ñð  €MóHó
Ló	Bò6ò6òOóVr   r5   c                   ó$   — e Zd ZdZd„ Zdd„Zd„ Zy)ÚXLinkz XLink mixin c                 ó2   — || _         | j                  «        y)a
  
        Create a reference to **element**.

        :param element: if element is a `string` its the **id** name of the
          referenced element, if element is a **BaseElement** class the **id**
          SVG Attribute is used to create the reference.

        N)ÚhrefÚ	update_id)r   Úelements     r   Úset_hrefzXLink.set_href‡   s   € ð ˆŒ	Ø�‰Õr   Nc                 ó>   — |�|| d<   |�|| d<   |�|| d<   |�|| d<   yy)zA Set XLink attributes (for `href` use :meth:`set_href`).
        Nz
xlink:rolezxlink:arcrolezxlink:titlez
xlink:showr"   )r   ÚtitleÚshowÚroleÚarcroles        r   Ú	set_xlinkzXLink.set_xlink“   sI   € ð ÐØ!%ˆD�ÑØÐØ$+ˆD�Ñ!ØÐØ"'ˆD�ÑØÐØ!%ˆD�Òð r   c                 ó´   — t        | d«      sy t        | j                  «      r| j                  }n| j                  j                  «       }|| j                  d<   y )Nr]   z
xlink:href)Úhasattrr   r]   Úget_irirT   )r   Úidstrs     r   r^   zXLink.update_idŸ   sD   € Ü�t˜VÔ$ØÜ�T—Y‘YÔØ—I‘I‰Eà—I‘I×%Ñ%Ó'ˆEØ%*ˆ�‰�\Ò"r   )NNNN)r0   r1   r2   r3   r`   rf   r^   r"   r   r   r[   r[   …   s   „ Ùò
ó
&ó+r   r[   c                   ó,   — e Zd ZdZdd„Z	 	 dd„Zdd„Zy)	ÚPresentationz8
    Helper methods to set presentation attributes.
    Nc                 ón   — |�$t        |«      r|| d<   n|j                  «       | d<   |�|| d<   |�|| d<   | S )zS
        Set SVG Properties **fill**, **fill-rule** and **fill-opacity**.

        Úfillz	fill-rulezfill-opacity©r   Úget_paint_server)r   ÚcolorÚruleÚopacitys       r   rn   zPresentation.fill­   sR   € ð
 ÐÜ˜ÔØ$��V’à$×5Ñ5Ó7��V‘ØÐØ $ˆD�ÑØÐØ#*ˆD�Ñ Øˆr   c                 ó˜   — |�$t        |«      r|| d<   n|j                  «       | d<   |�|| d<   |�|| d<   |�|| d<   |�|| d<   |�|| d<   | S )z�
        Set SVG Properties **stroke**, **stroke-width**, **stroke-opacity**,
        **stroke-linecap** and **stroke-miterlimit**.

        Ústrokezstroke-widthzstroke-opacityzstroke-linecapzstroke-linejoinzstroke-miterlimitro   )r   rq   r   rs   ÚlinecapÚlinejoinÚ
miterlimits          r   ru   zPresentation.stroke½   s†   € ð ÐÜ˜ÔØ!&��X’à!&×!7Ñ!7Ó!9��X‘ØÐØ#(ˆD�Ñ ØÐØ%,ˆDÐ!Ñ"ØÐØ%,ˆDÐ!Ñ"ØÐØ&.ˆDÐ"Ñ#ØÐ!Ø(2ˆDÐ$Ñ%Øˆr   c                 ó6   — |�t        |d«      | d<   |�|| d<   | S )at  
        Set SVG Properties **stroke-dashoffset** and **stroke-dasharray**.

        Where *dasharray* specify the lengths of alternating dashes and gaps as
        <list> of <int> or <float> values or a <string> of comma and/or white
        space separated <lengths> or <percentages>. (e.g. as <list> dasharray=[1, 0.5]
        or as <string> dasharray='1 0.5')
        r'   zstroke-dasharrayzstroke-dashoffsetr   )r   Ú	dasharrayÚoffsets      r   rz   zPresentation.dasharrayÖ   s2   € ð Ð Ü'.¨y¸#Ó'>ˆDÐ#Ñ$ØÐØ(.ˆDÐ$Ñ%Øˆr   )NNN)NNNNNN©NN)r0   r1   r2   r3   rn   ru   rz   r"   r   r   rl   rl   ©   s    „ ñóð  DHØ)-óô2r   rl   c                   ó   — e Zd ZdZdd„Zy)Ú
MediaGroupz8
    Helper methods to set media group attributes.

    Nc                 ó"   — |�|| d<   |�|| d<   | S )zV
        Set SVG Properties **viewport-fill** and **viewport-fill-opacity**.

        zviewport-fillzviewport-fill-opacityr"   )r   rq   rs   s      r   Úviewport_fillzMediaGroup.viewport_fillì   s*   € ð
 ÐØ$)ˆD�Ñ!ØÐØ,3ˆDÐ(Ñ)Øˆr   r|   )r0   r1   r2   r3   r€   r"   r   r   r~   r~   æ   s   „ ñô
	r   r~   c                   ó   — e Zd ZdZd„ Zy)ÚMarkersz3
    Helper methods to set marker attributes.

    c                 óÖ   — d„ }t        |«      r ||«      | d<   y	 |\  }}}|r ||«      | d<   |r ||«      | d<   |r ||«      | d<   yy# t        t        f$ r  ||«      | d<   Y yw xY w)a£  
        Set markers for line elements (line, polygon, polyline, path) to
        values specified by  `markers`.

        * if `markers` is a 3-tuple:

          * attribute 'marker-start' = markers[0]
          * attribute 'marker-mid' = markers[1]
          * attribute 'marker-end' = markers[2]

        * `markers` is a `string` or a `Marker` class:

          * attribute 'marker' = `FuncIRI` of markers

        c                 ó2   — t        | «      rd| z  S d| d   z  S )Nzurl(%s)zurl(#%s)Úidr   )Úvalues    r   Úget_funciriz(Markers.set_markers.<locals>.get_funciri  s&   € Ü˜Ôà  5Ñ(Ð(ð " E¨$¡KÑ/Ð/r   Úmarkerzmarker-startz
marker-midz
marker-endN)r   Ú	TypeErrorÚKeyError)r   Úmarkersr‡   Ústart_markerÚ
mid_markerÚ
end_markers         r   Úset_markerszMarkers.set_markersý   s�   € ò 	0ô �WÔÙ(¨Ó1ˆD�ŠNð	6Ø7>Ñ4�˜j¨*ÙÙ+6°|Ó+D�D˜Ñ(ÙÙ)4°ZÓ)@�D˜Ñ&ÙÙ)4°ZÓ)@�D˜Ò&ð øäœxÐ(ò 6Ù!,¨WÓ!5��X“ð6ús   œ-A ÁA(Á'A(N)r0   r1   r2   r3   r�   r"   r   r   r‚   r‚   ø   s   „ ñó$6r   r‚   c                   ó   — e Zd Zdd„Zy)ÚClippingc           	      ó(   — d|›d|›d|›d|›d�	| d<   y)z-
        Set SVG Property **clip**.

        zrect(Ú,Ú)ÚclipNr"   )r   r   r   r   r   s        r   Ú	clip_rectzClipping.clip_rect%  s   � ò
 /2²5º&Â$ÐGˆˆVŠr   N)Úautor—   r—   r—   )r0   r1   r2   r–   r"   r   r   r‘   r‘   $  s   „ ôHr   r‘   N)Úsvgwrite.utilsr   r   r*   r+   Úobjectr   r5   r[   rl   r~   r‚   r‘   r"   r   r   Ú<module>rš      s†   ðõ #Ý $à F°VÑ	<€Ø 6°FÑ	;€ô1Uˆfô 1Uôf@V�ô @VôF!+ˆFô !+ôH:�6ô :ôz�ô ô$)6ˆfô )6ôXHˆvõ Hr   