| Server IP : 93.115.150.27 / Your IP : 216.73.216.221 Web Server : LiteSpeed System : Linux host2.azar.host 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 User : dorfakkh ( 1797) PHP Version : 8.1.34 Disable Function : show_source, system, passthru, exec, popen, proc_open, mail MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python37/lib/python3.7/site-packages/svgwrite/__pycache__/ |
Upload File : |
B
��]M � @ sV d Z ddlmZ ddlZddlmZmZ ddlmZ ddl m
Z
G dd� dee�ZdS ) a�
The *Drawing* object is the overall container for all SVG
elements. It provides the methods to store the drawing into a file or a
file-like object. If you want to use stylesheets, the reference links
to this stylesheets were also stored (`add_stylesheet`)
in the *Drawing* object.
set/get SVG attributes::
element['attribute'] = value
value = element['attribute']
The Drawing object also includes a defs section, add elements to the defs
section by::
drawing.defs.add(element)
� )�unicode_literalsN)�SVG�Defs)�ElementFactory)�
pretty_xmlc s^ e Zd ZdZd� fdd� Z� fdd�Zdd
d�Zddd�Zddd�Zddd�Z dd� Z
� ZS )�Drawinga� This is the SVG drawing represented by the top level *svg* element.
A drawing consists of any number of SVG elements contained within the drawing
element, stored in the *elements* attribute.
A drawing can range from an empty drawing (i.e., no content inside of the drawing),
to a very simple drawing containing a single SVG element such as a *rect*,
to a complex, deeply nested collection of container elements and graphics elements.
�
noname.svg�z100%z100%c s* t t| �jf d|i|�� || _g | _dS )a�
:param string filename: filesystem filename valid for :func:`open`
:param 2-tuple size: width, height
:param keywords extra: additional svg-attributes for the *SVG* object
Important (and not SVG Attributes) **extra** parameters:
:param string profile: ``'tiny | full'`` - define the SVG baseProfile
:param bool debug: switch validation on/off
�sizeN)�superr �__init__�filename�_stylesheets)�selfr
r
�extra)� __class__� �A/opt/alt/python37/lib/python3.7/site-packages/svgwrite/drawing.pyr , s zDrawing.__init__c sL | j }| j}d| jd<