403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.223.125.111
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/svgwrite/__pycache__/gradients.cpython-37.pyc
B

��]�@stdZddlmZddlmZmZddlmZGdd�de�ZGdd�deee�Z	Gd	d
�d
e	�Z
Gdd�de	�Zd
S)a	
Gradients consist of continuously smooth color transitions along a vector
from one color to another, possibly followed by additional transitions along
the same vector to other colors. SVG provides for two types of gradients:
linear gradients and radial gradients.
�)�BaseElement)�	Transform�XLink)�	is_stringcs"eZdZdZd�fdd�	Z�ZS)�
_GradientStop�stopNcsFtt|�jf|�|dk	r"||d<|dk	r2||d<|dk	rB||d<dS)N�offsetz
stop-colorzstop-opacity)�superr�__init__)�selfr�color�opacity�extra)�	__class__��C/opt/alt/python37/lib/python3.7/site-packages/svgwrite/gradients.pyr
sz_GradientStop.__init__)NNN)�__name__�
__module__�__qualname__�elementnamer
�
__classcell__rr)rrrsrcsLeZdZdZd�fdd�	Zddd�Zddd	�Zddd�Z�fd
d�Z�Z	S)�_AbstractGradientZgradientTransformNcs@tt|�jf|�|dk	r<t|�r.|�|�n|�|���dS)N)r	rr
rZset_hrefZget_iri)r�inheritr)rrrr
%s
z_AbstractGradient.__init__�nonecCsd|��|fS)z( Returns the <FuncIRI> of the gradient. z%s %s)Zget_funciri)r�defaultrrr�get_paint_server-sz"_AbstractGradient.get_paint_servercCs|�t||||d��|S)a: Adds a stop-color to the gradient.

        :param offset: is either a <number> (usually ranging from 0 to 1) or
          a `<percentage>` (usually ranging from 0% to 100%) which indicates where
          the gradient stop is placed. Represents a location along the gradient
          vector. For radial gradients, it represents a percentage distance from
          (fx,fy) to the edge of the outermost/largest circle.
        :param color: indicates what color to use at that gradient stop
        :param opacity: defines the opacity of a given gradient stop
        )�factory)�addr)rrrr
rrr�add_stop_color1sz _AbstractGradient.add_stop_color�gg�?c	Csbt|d�}t|d�}||tt|�d�}|}x(|D] }|�t|d�||�||7}q:W|S)z� Add stop-colors from colors with linear offset distributuion
        from sweep[0] to sweep[1].

        i.e. colors=['white', 'red', 'blue']
          'white': offset = 0.0
          'red': offset = 0.5
          'blue': offset = 1.0
        r��)�float�lenr�round)	rZcolorsZsweepr
�start�end�deltarrrrr�
add_colors?s	
z_AbstractGradient.add_colorscs t|d�r|��tt|���S)NZhref)�hasattrZ	update_idr	r�get_xml)r)rrrr*Qs
z_AbstractGradient.get_xml)N)r)NNN)rN)
rrrZ
transformnamer
rrr(r*rrr)rrr"s


rcs&eZdZdZdZd�fdd�	Z�ZS)�LinearGradientzE Linear gradients are defined by a SVG <linearGradient> element.
    ZlinearGradientNcs^tt|�jfd|i|��|dk	r:|d|d<|d|d<|dk	rZ|d|d<|d|d<dS)	z�
        :param 2-tuple start: start point of the gradient (**x1**, **y1**)
        :param 2-tuple end: end point of the gradient (**x2**, **y2**)
        :param inherit: gradient inherits properties from `inherit` see: **xlink:href**

        rNr�x1r �y1Zx2�y2)r	r+r
)rr%r&rr)rrrr
\szLinearGradient.__init__)NNN)rrr�__doc__rr
rrr)rrr+Wsr+cs&eZdZdZdZd�fdd�	Z�ZS)�RadialGradientzE Radial gradients are defined by a SVG <radialGradient> element.
    ZradialGradientNcsntt|�jfd|i|��|dk	r:|d|d<|d|d<|dk	rJ||d<|dk	rj|d|d<|d|d	<dS)
a-
        :param 2-tuple center: center point for the gradient (**cx**, **cy**)
        :param r: radius for the gradient
        :param 2-tuple focal: focal point for the radial gradient (**fx**, **fy**)
        :param inherit: gradient inherits properties from `inherit` see: **xlink:href**

        rNrZcxr �cy�r�fxZfy)r	r0r
)r�centerr2Zfocalrr)rrrr
qs	zRadialGradient.__init__)NNNN)rrrr/rr
rrr)rrr0lsr0N)r/Z
svgwrite.baserZsvgwrite.mixinsrrZsvgwrite.utilsrrrr+r0rrrr�<module>
s5

Youez - 2016 - github.com/yon3zu
LinuXploit