
    p"h                         S SK Jr  S SKJr  S SKJrJr   " S S\\5      r " S S\5      r " S S	\5      r	 " S
 S\	5      r
 " S S\	5      rg)    )BaseElement)XLink)strlist	is_stringc                   h   ^  \ rS rSrSrSrSU 4S jjrU 4S jrSS jrSS jr	  SS jr
S	 rS
rU =r$ )Set   ak  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.
setc                 X   > [         [        U ]
  " S0 UD6  Ub  U R                  U5        gg)zSet constructor.

:param href: target svg element, if **href** is not `None`; else
    the target SVG Element is the parent SVG Element.
N )superr   __init__set_href)selfhrefextra	__class__s      B/var/www/html/env/lib/python3.13/site-packages/svgwrite/animate.pyr   Set.__init__   s.     	c4!*E*MM$     c                 H   > U R                  5         [        [        U ]  5       $ N)	update_idr   r   get_xml)r   r   s    r   r   Set.get_xml!   s    S$'))r   c                     XS'   Ub  X S'   gg)zI
Set animation attributes :ref:`attributeName` and :ref:`attributeType`.
attributeNameNattributeTyper   )r   r   r   s      r   
set_targetSet.set_target%   s     !._$$1! %r   c                 >    Ub  XS'   Ub  X S'   Ub  X0S'   Ub  X@S'   gg)z[
Set animation attributes :ref:`onbegin`, :ref:`onend`, :ref:`onrepeat`
and :ref:`onload`.
Nonbeginonendonrepeatonloadr   )r   r"   r#   r$   r%   s        r   	set_eventSet.set_event.   s>    
 %O!M'#N r   c	                 v    Ub  XS'   Ub  X S'   Ub  X0S'   Ub  X@S'   Ub  XPS'   Ub  X`S'   Ub  XpS'   Ub  XS	'   gg)
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   r)   r*   r+   r,   r-   r.   r/   r0   s	            r   
set_timingSet.set_timing<   so     !M?K?K?K?K%O""-  ) !r   c                     SU S'   g)zJFreeze the animation effect. (see also :ref:`fill <animateFill>`)
        freezefillNr   )r   s    r   r4   
Set.freezeT   s      Vr   r   r   NNNN)NNNNNNNN)__name__
__module____qualname____firstlineno____doc__elementnamer   r   r   r&   r1   r4   __static_attributes____classcell__r   s   @r   r   r      s<     K *2$ HL=A*0   r   r   c                   >   ^  \ rS rSrSrSrSU 4S jjrSS jrSrU =r	$ )	AnimateMotionY   zWThe **animateMotion** element causes a referenced element to move
along a motion path.
animateMotionc                 B   > [         [        U ]
  " SSU0UD6  Ub  XS'   gg)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.
r   Npathr   )r   rB   r   )r   rF   r   r   r   s       r   r   AnimateMotion.__init___   s.     	mT+???L r   c                 >    Ub  XS'   Ub  X S'   Ub  X0S'   Ub  X@S'   gg)zH
Set animation attributes `path`, `calcMode`, `keyPoints` and `rotate`.
NrF   calcMode	keyPointsrotater   )r   rF   rI   rJ   rK   s        r   	set_valueAnimateMotion.set_valuei   s?     L'  )#N r   r   )NNr7   
r8   r9   r:   r;   r<   r=   r   rL   r>   r?   r@   s   @r   rB   rB   Y   s     "K $ $r   rB   c                   B   ^  \ rS rSrSrSrSU 4S jjr  SS jrSrU =r	$ )	Animatew   zlThe **animate** element allows scalar attributes and properties to be
assigned different values over time .
animatec                    > [         [        U ]
  " SSU0UD6  Ub  U R                  U5        Ub  U R	                  U5        gg)a  
: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.
r   Nr   )r   rP   r   rL   r   )r   r   valuesr   r   r   s        r   r   Animate.__init__}   sE     	gt%94959NN6"$OOM* %r   c                     Ub   [        U5      (       d  [        US5      nXS'   Ub  X S'   Ub  X0S'   Ub  X@S'   Ub  XPS'   Ub  X`S'   Ub  XpS	'   gg)
z
Set animation attributes :ref:`values`, :ref:`calcMode`, :ref:`keyTimes`,
:ref:`keySplines`, :ref:`from`, :ref:`to` and :ref:`by`.
N;rT   rI   keyTimes
keySplinesfromtoby)r   r   )r   rT   rI   rX   rY   from_r[   r\   s           r   rL   Animate.set_value   s|     V$$ -#N''!!+ L>J>J r   r   )NNN)NNNNNNrN   r@   s   @r   rP   rP   w   s(     K+ JN*. r   rP   c                       \ rS rSrSrSrSrg)AnimateColor   zIThe **animateColor** element specifies a color transformation over
time.
animateColorr   N)r8   r9   r:   r;   r<   r=   r>   r   r   r   r`   r`      s     !Kr   r`   c                   4   ^  \ rS rSrSrSrSU 4S jjrSrU =r$ )AnimateTransform   zThe **animateTransform** element animates a transformation attribute
on a target element, thereby allowing animations to control translation,
scaling, rotation and/or skewing.
animateTransformc                 8   > [         [        U ]
  " U40 UD6  XS'   g)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)r   rd   r   )r   	transformelementr   r   s       r   r   AnimateTransform.__init__   s!     	.w@%@ Vr   r   r   )	r8   r9   r:   r;   r<   r=   r   r>   r?   r@   s   @r   rd   rd      s     %K! !r   rd   N)svgwrite.baser   svgwrite.mixinsr   svgwrite.utilsr   r   r   rB   rP   r`   rd   r   r   r   <module>ro      sR    & ! -I +u I V$C $<)c )X!7 !!w !r   