ok

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/svgwrite/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/svgwrite/__pycache__/animate.cpython-37.pyc

B

s�]:�@s~ddlmZddlmZddlmZmZGdd�dee�ZGdd�de�ZGdd	�d	e�Z	Gd
d�de	�Z
Gdd
�d
e	�ZdS)�)�BaseElement)�XLink)�strlist�	is_stringcsXeZdZdZdZd�fdd�	Z�fdd�Zddd	�Zdd
d�Zddd
�Z	dd�Z
�ZS)�Seta� The **set** element provides a simple means of just setting the value
    of an attribute for a specified duration. It supports all attribute types,
    including those that cannot reasonably be interpolated, such as string
    and boolean values. The **set** element is non-additive. The additive and
    accumulate attributes are not allowed, and will be ignored if specified.
    �setNcs(tt|�jf|�|dk	r$|�|�dS)z� Set constructor.

        :param href: target svg element, if **href** is not `None`; else
            the target SVG Element is the parent SVG Element.
        N)�superr�__init__Zset_href)�self�href�extra)�	__class__��/animate.pyr	szSet.__init__cs|��tt|���S)N)Z	update_idrr�get_xml)r
)r
rrr szSet.get_xmlcCs||d<|dk	r||d<dS)zY
        Set animation attributes :ref:`attributeName` and :ref:`attributeType`.
        �
attributeNameN�
attributeTyper)r
rrrrr�
set_target$szSet.set_targetcCsD|dk	r||d<|dk	r ||d<|dk	r0||d<|dk	r@||d<dS)zs
        Set animation attributes :ref:`onbegin`, :ref:`onend`, :ref:`onrepeat`
        and :ref:`onload`.
        N�onbegin�onend�onrepeat�onloadr)r
rrrrrrr�	set_event-sz
Set.set_eventc		Cs�|dk	r||d<|dk	r ||d<|dk	r0||d<|dk	r@||d<|dk	rP||d<|dk	r`||d<|dk	rp||d<|dk	r�||d	<dS)
z�
        Set animation attributes :ref:`begin`, :ref:`end`, :ref:`dur`,
        :ref:`min`, :ref:`max`, :ref:`restart`, :ref:`repeatCount` and
        :ref:`repeatDur`.
        N�begin�end�dur�min�max�restart�repeatCount�	repeatDurr)	r
rrrrrrrr rrr�
set_timing;s zSet.set_timingcCsd|d<dS)zK Freeze the animation effect. (see also :ref:`fill <animateFill>`)
        �freezeZfillNr)r
rrrr"Ssz
Set.freeze)N)N)NNNN)NNNNNNNN)�__name__�
__module__�__qualname__�__doc__�elementnamer	rrrr!r"�
__classcell__rr)r
rr
s

	

rcs0eZdZdZdZd�fdd�	Zd	dd�Z�ZS)
�
AnimateMotionz` The **animateMotion** element causes a referenced element to move
    along a motion path.
    Z
animateMotionNcs.tt|�jfd|i|��|dk	r*||d<dS)z�
        :param path: the motion path
        :param href: target svg element, if **href** is not `None`; else
          the target SVG Element is the parent SVG Element.
        rN�path)rr)r	)r
r*rr)r
rrr	^szAnimateMotion.__init__cCsD|dk	r||d<|dk	r ||d<|dk	r0||d<|dk	r@||d<dS)zX
        Set animation attributes `path`, `calcMode`, `keyPoints` and `rotate`.
        Nr*�calcMode�	keyPoints�rotater)r
r*r+r,r-rrr�	set_valuehszAnimateMotion.set_value)NN)NNNN)r#r$r%r&r'r	r.r(rr)r
rr)Xs
r)cs0eZdZdZdZd�fdd�	Zd	dd�Z�ZS)
�Animatezu The **animate** element allows scalar attributes and properties to be
    assigned different values over time .
    ZanimateNcsBtt|�jfd|i|��|dk	r,|�|�|dk	r>|�|�dS)a0
        :param attributeName: name of the SVG Attribute to animate
        :param values: interpolation values, `string` as `<semicolon-list>` or a python `list`
        :param href: target svg element, if **href** is not `None`; else
          the target SVG Element is the parent SVG Element.
        rN)rr/r	r.r)r
r�valuesrr)r
rrr	|s

zAnimate.__init__cCs�|dk	r"t|�st|d�}||d<|dk	r2||d<|dk	rB||d<|dk	rR||d<|dk	rb||d<|dk	rr||d<|dk	r�||d	<dS)
z�
        Set animation attributes :ref:`values`, :ref:`calcMode`, :ref:`keyTimes`,
        :ref:`keySplines`, :ref:`from`, :ref:`to` and :ref:`by`.
        N�;r0r+�keyTimes�
keySplines�from�to�by)rr)r
r0r+r2r3Zfrom_r5r6rrrr.�s 
zAnimate.set_value)NNN)NNNNNN)r#r$r%r&r'r	r.r(rr)r
rr/vs

r/c@seZdZdZdZdS)�AnimateColorzR The **animateColor** element specifies a color transformation over
    time.
    ZanimateColorN)r#r$r%r&r'rrrrr7�sr7cs&eZdZdZdZd�fdd�	Z�ZS)�AnimateTransformz� The **animateTransform** element animates a transformation attribute
    on a target element, thereby allowing animations to control translation,
    scaling, rotation and/or skewing.
    ZanimateTransformNcs tt|�j|f|�||d<dS)z�
        :param element: target svg element, if element is not `None`; else
          the target svg element is the parent svg element.
        :param string transform: ``'translate | scale | rotate | skewX | skewY'``
        �typeN)rr8r	)r
Z	transformZelementr)r
rrr	�szAnimateTransform.__init__)N)r#r$r%r&r'r	r(rr)r
rr8�sr8N)Z
svgwrite.baserZsvgwrite.mixinsrZsvgwrite.utilsrrrr)r/r7r8rrrr�<module>sK,

Zerion Mini Shell 1.0