Server IP : 192.158.238.246 / Your IP : 18.221.20.252 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE 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 ��] � @ s| d Z ddlmZ ddlZddlmZ ddlmZmZm Z G dd� de �ZG dd � d e �ZG d d� de�Z G dd � d e�ZdS )z7 The **BaseElement** is the root for all SVG elements. � )�etreeN)� Parameter)�AutoID� to_unicode�PYTHON3c @ s� e Zd ZdZdZdd� Zdd� Zdd� Zed d � �Z edd� �Z ed d� �Zejdd� �Zedd� �Z dd� Zd/dd�Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd0d+d,�Zd-d.� ZdS )1�BaseElementz� The **BaseElement** is the root for all SVG elements. The SVG attributes are stored in **attribs**, and the SVG subelements are stored in **elements**. ZbaseElementc K s| |� dd�}|dk r|j| _nt� | _|� dd�}|dk rB|| j_|� dd�}|dk r^|| j_t� | _| �|� t� | _ dS )a� :param extra: extra SVG attributes (keyword arguments) * add trailing '_' to reserved keywords: ``'class_'``, ``'from_'`` * replace inner '-' by '_': ``'stroke_width'`` SVG attribute names will be checked, if **debug** is `True`. workaround for removed **attribs** parameter in Version 0.2.2:: # replace element = BaseElement(attribs=adict) #by element = BaseElement() element.update(adict) �factoryN�debug�profile) �pop� _parameterr r r �dict�attribs�update�list�elements)�self�extrar r r � r �>/opt/alt/python37/lib/python3.7/site-packages/svgwrite/base.py�__init__ s zBaseElement.__init__c C s8 x2|� � D ]&\}}|�d��dd�}| �||� q W dS )z� Update SVG Attributes from `dict` attribs. Rules for keys: 1. trailing '_' will be removed (``'class_'`` -> ``'class'``) 2. inner '_' will be replaced by '-' (``'stroke_width'`` -> ``'stroke-width'``) �_�-N)�items�rstrip�replace�__setitem__)r r �key�valuer r r r H s zBaseElement.updatec C s@ t � | �}t � | j�|_t � | j�|_d|jkr<|�� |d<