????

Your IP : 13.59.219.20


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/svgwrite/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/svgwrite/__pycache__/__init__.cpython-311.pyc

�

�܋f�	���dZddlmZmZeZdZdZdZdZddlm	Z	dd	l
mZGd
�de��Z
e
d��Ze
d
��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��Ze
d��ZdS)ar
A Python library to create SVG drawings.

SVG is a language for describing two-dimensional graphics in XML. SVG allows
for three types of graphic objects: vector graphic shapes (e.g., paths
consisting of straight lines and curves), images and text. Graphical objects
can be grouped, styled, transformed and composed into previously rendered
objects. The feature set includes nested transformations, clipping paths,
alpha masks, filter effects and template objects.

SVG drawings can be interactive and dynamic. Animations can be defined and
triggered either declarative (i.e., by embedding SVG animation elements in
SVG content) or via scripting.

.. seealso:: http://www.w3.org/TR/SVG11/intro.html#AboutSVG

a simple example::

    import svgwrite

    dwg = svgwrite.Drawing('test.svg', profile='tiny')
    dwg.add(dwg.line((0, 0), (10, 0), stroke=svgwrite.rgb(10, 10, 16, '%')))
    dwg.add(dwg.text('Test', insert=(0, 0.2)))
    dwg.save()

SVG Version
-----------

You can only create two types of SVG drawings:

* *SVG 1.2 Tiny Profile*, use Drawing(profile= ``'tiny'``)
* *SVG 1.1 Full Profile*, use Drawing(profile= ``'full'``)

�)�__version__�versionzmozman <me@mozman.at>zManfred Moitzizme@mozman.atz	2014-2019�)�Drawing)�rgbc�&�eZdZdZdd�Zd�Zd�ZdS)�Unitz Add units to values.
    �cmc��||_dS)zL Unit constructor

        :param str unit: specify the unit string
        N��_unit)�self�units  �H/opt/cloudlinux/venv/lib64/python3.11/site-packages/svgwrite/__init__.py�__init__z
Unit.__init__<s��
��
�
�
�c��|�|j��S)z2 add unit-string to 'other'. (e.g. 5*cm => '5cm') r)r�others  r�__rmul__z
Unit.__rmul__Cs�����
�
�+�+rc�F��d��fd�|D����S)z~ Add unit-strings to all arguments.

        :param args: list of values
            e.g.: cm(1,2,3) => '1cm,2cm,3cm'
        �,c�&��g|]
}|��j����S�r)�.0�argrs  �r�
<listcomp>z!Unit.__call__.<locals>.<listcomp>Ms$���D�D�D��3�3��
�
�3�D�D�Dr)�join)r�argss` r�__call__z
Unit.__call__Gs,����x�x�D�D�D�D�t�D�D�D�E�E�ErN)r
)�__name__�
__module__�__qualname__�__doc__rrrrrrr	r	9sU������������,�,�,�F�F�F�F�Frr	r
�mm�em�ex�px�in�pc�pt�%�deg�grad�rad�Hz�kHzN)r#rr�VERSION�
__author__�AUTHOR_NAME�AUTHOR_EMAIL�CYEAR�svgwrite.drawingr�svgwrite.utilsr�objectr	r
r$r%r&r'�inchr)r*�percentr,r-r.r/r0rrr�<module>r;sW��!�!�D*�)�)�)�)�)�)�)�
��
$�
�������%�$�$�$�$�$�������F�F�F�F�F�6�F�F�F�.
�T�$�Z�Z��	�T�$�Z�Z��	�T�$�Z�Z��	�T�$�Z�Z��	�T�$�Z�Z���t�D�z�z��	�T�$�Z�Z��	�T�$�Z�Z��
�$�s�)�)��
�d�5�k�k���t�F�|�|��
�d�5�k�k��	�T�$�Z�Z��
�d�5�k�k���r