$12 GRAYBYTE WORDPRESS FILE MANAGER $36

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.6
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/svgwrite/__pycache__/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/svgwrite/__pycache__//container.cpython-311.pyc
�

�|oi�)��~�dZddlmZddlmZmZmZddlmZddl	m
Z
mZmZddl	m
Z
mZddlmZGd�d	eee
��ZGd
�de��ZGd�d
ee
e
e��ZGd�dee
e
��ZdZGd�de��ZGd�deeee
��ZGd�deee
��ZGd�de��ZGd�de��ZdS)a�
The **container** module provides following structural objects:

* :class:`svgwrite.Group`
* :class:`svgwrite.SVG`
* :class:`svgwrite.Defs`
* :class:`svgwrite.Symbol`
* :class:`svgwrite.Marker`
* :class:`svgwrite.Use`
* :class:`svgwrite.Hyperlink`
* :class:`svgwrite.Script`
* :class:`svgwrite.Style`

set/get SVG attributes::

    element['attribute'] = value
    value = element['attribute']

�)�urlopen)�
font_mimetype�base64_data�find_first_url)�BaseElement)�ViewBox�	Transform�XLink)�Presentation�Clipping)�CDATAc��eZdZdZdZdS)�Groupa\ The **Group** (SVG **g**) element is a container element for grouping
    together related graphics elements.

    Grouping constructs, when used in conjunction with the **desc** and **title**
    elements, provide information about document structure and semantics.
    Documents that are rich in structure may be rendered graphically, as speech,
    or as braille, and thus promote accessibility.

    A group of elements, as well as individual objects, can be given a name using
    the **id** attribute. Named groups are needed for several purposes such as
    animation and re-usable objects.

    �gN��__name__�
__module__�__qualname__�__doc__�elementname���d/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/svgwrite/container.pyrr"s���������K�K�Krrc��eZdZdZdZdS)�Defsz� The **defs** element is a container element for referenced elements. For
    understandability and accessibility reasons, it is recommended that, whenever
    possible, referenced elements be defined inside of a **defs**.
    �defsNrrrrrr3s���������K�K�Krrc��eZdZdZdZdS)�Symbola� The **symbol** element is used to define graphical template objects which
    can be instantiated by a **use** element. The use of **symbol** elements for
    graphics that are used multiple times in the same document adds structure and
    semantics. Documents that are rich in structure may be rendered graphically,
    as speech, or as braille, and thus promote accessibility.
    �symbolNrrrrrr;s���������K�K�Krrc�(��eZdZdZdZd�fd�	Z�xZS)�Markera) The **marker** element defines the graphics that is to be used for
    drawing arrowheads or polymarkers on a given **path**, **line**, **polyline**
    or **polygon** element.

    Add Marker definitions to a **defs** section, preferred to the **defs** section
    of the **main drawing**.

    �markerNc���tt|��jd
i|��|�|d|d<|d|d<|�|d|d<|d|d<|�||d<d	|jvr|���|d	<dSdS)z�
        :param 2-tuple insert: reference point (**refX**, **refY**)
        :param 2-tuple size: (**markerWidth**, **markerHeight**)
        :param orient: ``'auto'`` | `angle`
        :param extra: additional SVG attributes as keyword-arguments
        Nr�refX��refY�markerWidth�markerHeight�orient�idr)�superr!�__init__�attribs�next_id)�self�insert�sizer)�extra�	__class__s     �rr,zMarker.__init__Qs����	%��f�d���$�-�-�u�-�-�-���!�!�9�D��L�!�!�9�D��L���"&�q�'�D���#'��7�D�� ���#�D��N��t�|�#�#������D��J�J�J�$�#r)NNN�rrrrrr,�
__classcell__�r3s@rr!r!FsN����������K�(�(�(�(�(�(�(�(�(�(rr!zF@font-face{{ 
    font-family: "{name}"; 
    src: url("{data}"); 
}}
c�@��eZdZdZdZd	�fd�	Zd�Zd�Zd�Zd�Z	�xZ
S)
�SVGa� A SVG document fragment consists of any number of SVG elements contained
    within an **svg** element.

    An SVG document fragment can range from an empty fragment (i.e., no content
    inside of the **svg** element), to a very simple SVG document fragment containing
    a single SVG graphics element such as a **rect**, to a complex, deeply nested
    collection of container elements and graphics elements.
    �svgNc���tt|��jd	i|��|�|d|d<|d|d<|�|d|d<|d|d<t|���|_|�|j��dS)
z�
        :param 2-tuple insert: insert position (**x**, **y**)
        :param 2-tuple size: (**width**, **height**)
        :param extra: additional SVG attributes as keyword-arguments
        Nr�xr%�y�width�height)�factoryr)r+r8r,rr�add)r/r0r1r2r3s    �rr,zSVG.__init__ws����	"��c�4���!�*�*�E�*�*�*����q�	�D��I��q�	�D��I��� ��G�D��M�!�!�W�D��N���&�&�&��	����������rc�P�|j�t|����S)z� Add <style> tag to the defs section.

        :param content: style sheet content as string
        :return: :class:`~svgwrite.container.Style` object
        )rr@�Style�r/�contents  r�embed_stylesheetzSVG.embed_stylesheet�s���y�}�}�U�7�^�^�,�,�,rc��t|d�����}|�||t|����dS)z� Embed font as base64 encoded data from font file.

        :param name: font name
        :param filename: file name of local stored font
        �rbN)�open�read�_embed_font_datar)r/�name�filename�datas    r�
embed_fontzSVG.embed_font�sE���H�d�#�#�(�(�*�*�����d�D�-��*A�*A�B�B�B�B�Brc�\�t|�����}t|�����}|�"t	d�|�����t|�����}|�||t|����dS)z� Embed font as base64 encoded data acquired from google fonts.

        :param name: font name
        :param uri: google fonts request uri like 'http://fonts.googleapis.com/css?family=Indie+Flower'
        NzGot no font data from uri: '{}')rrIr�decode�
ValueError�formatrJr)r/rK�uri�	font_info�font_urlrMs      r�embed_google_web_fontzSVG.embed_google_web_font�s����C�L�L�%�%�'�'�	�!�)�"2�"2�"4�"4�5�5�����>�E�E�c�J�J�K�K�K��8�$�$�)�)�+�+�D��!�!�$��m�H�.E�.E�F�F�F�F�Frc��t�|t||�����}|�|��dS)N)rKrM)�
FONT_TEMPLATErRrrE)r/rKrM�mimetyperDs     rrJzSVG._embed_font_data�s>���&�&�D�{�4��7R�7R�&�S�S�����g�&�&�&�&�&r�NN)rrrrrr,rErNrVrJr5r6s@rr8r8ls�����������K�������"-�-�-�C�C�C�G�G�G�'�'�'�'�'�'�'rr8c�2��eZdZdZdZd�fd�	Z�fd�Z�xZS)�Usea] The **use** element references another element and indicates that the graphical
    contents of that element is included/drawn at that given point in the document.

    Link to objects by href = ``'#object-id'`` or use the object itself as
    href-argument, if the given element has no **id** attribute it gets an
    automatic generated id.

    �useNc����tt|��jdi|��|�|��|�|d|d<|d|d<|�|d|d<|d|d<dSdS)	a
        :param string href: object link (id-string) or an object with an id-attribute
        :param 2-tuple insert: insert point (**x**, **y**)
        :param 2-tuple size: (**width**, **height**)
        :param extra: additional SVG attributes as keyword-arguments
        Nrr;r%r<r=r>r)r+r\r,�set_href)r/�hrefr0r1r2r3s     �rr,zUse.__init__�s����	"��c�4���!�*�*�E�*�*�*��
�
�d�������q�	�D��I��q�	�D��I��� ��G�D��M�!�!�W�D��N�N�N��rc�z��|���tt|�����S�N)�	update_idr+r\�get_xml)r/r3s �rrdzUse.get_xml�s/����������S�$���'�'�)�)�)rrZ)rrrrrr,rdr5r6s@rr\r\�sg����������K�%�%�%�%�%�%� *�*�*�*�*�*�*�*�*rr\c�(��eZdZdZdZd�fd�	Z�xZS)�	Hyperlinka� The **a** element indicate links (also known as Hyperlinks or Web links).

    The remote resource (the destination for the link) is defined by a `<URI>`
    specified by the XLink **xlink:href** attribute. The remote resource may be
    any Web resource (e.g., an image, a video clip, a sound bite, a program,
    another SVG document, an HTML document, an element within the current
    document, an element within a different document, etc.). By activating
    these links (by clicking with the mouse, through keyboard input, voice
    commands, etc.), users may visit these resources.

    A **Hyperlink** is defined for each separate rendered element
    contained within the **Hyperlink** class; add sublements as usual with
    the `add` method.

    �a�_blankc�d��tt|��jdi|��||d<|�||d<dSdS)z�
        :param string href: hyperlink to the target resource
        :param string target: ``'_blank|_replace|_self|_parent|_top|<XML-name>'``
        :param extra: additional SVG attributes as keyword-arguments
        �
xlink:hrefN�targetr)r+rfr,)r/r`rkr2r3s    �rr,zHyperlink.__init__�sM���	(��i����'�0�0�%�0�0�0�!��\����#�D��N�N�N��r)rhr4r6s@rrfrf�sN����������K�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$rrfc�8��eZdZdZdZd�fd�	Z�fd�Zd�Z�xZS)	�Scripta� The **script** element indicate links to a client-side language.  This
    is normally a  (also known as Hyperlinks or Web links).

    The remote resource (the source of the script) is defined by a `<URI>`
    specified by the XLink **xlink:href** attribute. The remote resource must
    be a text-file that contains the script contents.  This script can be used
    within the SVG file by catching events or adding the mouseover/mousedown/
    mouseup elements to the markup.

    �scriptN�c�d��tt|��jdi|��|�||d<||_dS)a
        :param string href: hyperlink to the target resource or *None* if using *content*
        :param string content: script content
        :param extra: additional attributes as keyword-arguments

        Use *href* **or** *content*, but not both at the same time.

        Nrjr)r+rmr,�_content)r/r`rDr2r3s    �rr,zScript.__init__�sC���	%��f�d���$�-�-�u�-�-�-���!%�D�����
�
�
rc���tt|�����}|jr'|�t|j����|Srb)r+rmrdrq�appendr
)r/�xmlr3s  �rrdzScript.get_xmlsI����F�D�!�!�)�)�+�+���=�	-��J�J�u�T�]�+�+�,�,�,��
rc�&�|xj|z
c_dS)z1 Append content to the existing element-content. N)rqrCs  rrsz
Script.appends���
�
�� �
�
�
�
r)Nro)	rrrrrr,rdrsr5r6s@rrmrm�sv�������	�	��K�
 �
 �
 �
 �
 �
 ������!�!�!�!�!�!�!rrmc�(��eZdZdZdZd�fd�	Z�xZS)rBz� The *style* element allows style sheets to be embedded directly within
    SVG content. SVG's *style* element has the same attributes as the
    corresponding element in HTML.

    �styleroc�V��tt|��jdd|i|��d|d<dS)z;
        :param string content: stylesheet content
        rDztext/css�typeNr)r+rBr,)r/rDr2r3s   �rr,zStyle.__init__s:���	$��e�T���#�=�=�G�=�u�=�=�=�!��V���r)ror4r6s@rrBrBsN���������
�K�"�"�"�"�"�"�"�"�"�"rrBN)r�urllib.requestr�svgwrite.utilsrrr�
svgwrite.baser�svgwrite.mixinsrr	r
rr�svgwrite.etreer
rrrr!rXr8r\rfrmrBrrr�<module>rsA����&#�"�"�"�"�"�E�E�E�E�E�E�E�E�E�E�%�%�%�%�%�%�5�5�5�5�5�5�5�5�5�5�2�2�2�2�2�2�2�2� � � � � � ������K��L����"�����5���������[�'�<�����(�(�(�(�(�[�'�<�(�(�(�>�
�='�='�='�='�='�&�='�='�='�@*�*�*�*�*�+�y�%��*�*�*�@$�$�$�$�$��Y��$�$�$�<$!�$!�$!�$!�$!�[�$!�$!�$!�N
"�
"�
"�
"�
"�F�
"�
"�
"�
"�
"r


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.cpython-311.pyc
3.625 KB
20 Jan 2026 1.01 PM
root / root
0644
animate.cpython-311.pyc
8.181 KB
20 Jan 2026 1.01 PM
root / root
0644
base.cpython-311.pyc
12.568 KB
20 Jan 2026 1.01 PM
root / root
0644
container.cpython-311.pyc
14.571 KB
20 Jan 2026 1.01 PM
root / root
0644
drawing.cpython-311.pyc
6.39 KB
20 Jan 2026 1.01 PM
root / root
0644
elementfactory.cpython-311.pyc
3.637 KB
20 Jan 2026 1.01 PM
root / root
0644
etree.cpython-311.pyc
1.566 KB
20 Jan 2026 1.01 PM
root / root
0644
filters.cpython-311.pyc
15.286 KB
20 Jan 2026 1.01 PM
root / root
0644
gradients.cpython-311.pyc
6.91 KB
20 Jan 2026 1.01 PM
root / root
0644
image.cpython-311.pyc
3.242 KB
20 Jan 2026 1.01 PM
root / root
0644
masking.cpython-311.pyc
2.477 KB
20 Jan 2026 1.01 PM
root / root
0644
mixins.cpython-311.pyc
13.727 KB
20 Jan 2026 1.01 PM
root / root
0644
params.cpython-311.pyc
2.948 KB
20 Jan 2026 1.01 PM
root / root
0644
path.cpython-311.pyc
4.426 KB
20 Jan 2026 1.01 PM
root / root
0644
pattern.cpython-311.pyc
2.76 KB
20 Jan 2026 1.01 PM
root / root
0644
shapes.cpython-311.pyc
7.94 KB
20 Jan 2026 1.01 PM
root / root
0644
solidcolor.cpython-311.pyc
2.413 KB
20 Jan 2026 1.01 PM
root / root
0644
text.cpython-311.pyc
11.47 KB
20 Jan 2026 1.01 PM
root / root
0644
utils.cpython-311.pyc
10.72 KB
20 Jan 2026 1.01 PM
root / root
0644
validator2.cpython-311.pyc
8.764 KB
20 Jan 2026 1.01 PM
root / root
0644
version.cpython-311.pyc
0.267 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF