
     h                         d dl mZ d dlmZ d dlmZmZ  G d dee      Z G d de      Z G d d	e      Z	 G d
 de	      Z
 G d de	      Zy)    )BaseElement)XLink)strlist	is_stringc                   T     e Zd ZdZdZd	 fd	Z fdZd	dZd
dZ	 	 ddZ	d Z
 xZS )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.
    setc                 T    t        t        | 
  di | || j                  |       yy)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__set_href)selfhrefextra	__class__s      l/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/svgwrite/animate.pyr   zSet.__init__   s.     	c4!*E*MM$     c                 H    | j                          t        t        |          S N)	update_idr   r   get_xml)r   r   s    r   r   zSet.get_xml!   s    S$'))r   c                     || d<   ||| d<   yy)zY
        Set animation attributes :ref:`attributeName` and :ref:`attributeType`.
        attributeNameNattributeTyper   )r   r   r   s      r   
set_targetzSet.set_target%   s#     !._$$1D! %r   c                 >    ||| d<   ||| d<   ||| d<   ||| d<   yy)zs
        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_eventzSet.set_event.   sF    
 %DO!DM'D#DN r   c	                 v    ||| d<   ||| d<   ||| d<   ||| d<   ||| d<   ||| d<   ||| d<   ||| d	<   yy)
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*   r+   s	            r   
set_timingzSet.set_timing<   s     !DM?DK?DK?DK?DK%DO""-D  )D !r   c                     d| d<   y)zK Freeze the animation effect. (see also :ref:`fill <animateFill>`)
        freezefillNr   )r   s    r   r.   z
Set.freezeT   s      Vr   r   NNNN)NNNNNNNN)__name__
__module____qualname____doc__elementnamer   r   r   r"   r,   r.   __classcell__r   s   @r   r   r      s7     K *2$ HL=A*0 r   r   c                   0     e Zd ZdZdZd fd	ZddZ xZS )AnimateMotionz` The **animateMotion** element causes a referenced element to move
    along a motion path.
    animateMotionc                 @    t        t        | 
  dd|i| ||| d<   yy)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   r9   r   )r   r<   r   r   r   s       r   r   zAnimateMotion.__init___   s0     	mT+???DL r   c                 >    ||| d<   ||| d<   ||| d<   ||| d<   yy)zX
        Set animation attributes `path`, `calcMode`, `keyPoints` and `rotate`.
        Nr<   calcMode	keyPointsrotater   )r   r<   r>   r?   r@   s        r   	set_valuezAnimateMotion.set_valuei   sG     DL'D  )D#DN r   )NNr0   r1   r2   r3   r4   r5   r   rA   r6   r7   s   @r   r9   r9   Y   s     "K $r   r9   c                   4     e Zd ZdZdZd fd	Z	 	 ddZ xZS )Animatezu The **animate** element allows scalar attributes and properties to be
    assigned different values over time .
    animatec                 ~    t        t        | 
  dd|i| || j                  |       || j	                  |       yy)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.
        r   Nr   )r   rD   r   rA   r   )r   r   valuesr   r   r   s        r   r   zAnimate.__init__}   sE     	gt%94959NN6"$OOM* %r   c                     |t        |      st        |d      }|| d<   ||| d<   ||| d<   ||| d<   ||| d<   ||| d<   ||| d	<   yy)
z
        Set animation attributes :ref:`values`, :ref:`calcMode`, :ref:`keyTimes`,
        :ref:`keySplines`, :ref:`from`, :ref:`to` and :ref:`by`.
        N;rG   r>   keyTimes
keySplinesfromtoby)r   r   )r   rG   r>   rJ   rK   from_rM   rN   s           r   rA   zAnimate.set_value   s     V$ -#DN'D'D!!+D DL>DJ>DJ r   )NNN)NNNNNNrB   r7   s   @r   rD   rD   w   s#     K+ JN*.r   rD   c                       e Zd ZdZdZy)AnimateColorzR The **animateColor** element specifies a color transformation over
    time.
    animateColorN)r1   r2   r3   r4   r5   r   r   r   rQ   rQ      s     !Kr   rQ   c                   (     e Zd ZdZdZd fd	Z xZS )AnimateTransformz The **animateTransform** element animates a transformation attribute
    on a target element, thereby allowing animations to control translation,
    scaling, rotation and/or skewing.
    animateTransformc                 8    t        t        | 
  |fi | || d<   y)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   rT   r   )r   	transformelementr   r   s       r   r   zAnimateTransform.__init__   s#     	.w@%@ Vr   r   )r1   r2   r3   r4   r5   r   r6   r7   s   @r   rT   rT      s     %K! !r   rT   N)svgwrite.baser   svgwrite.mixinsr   svgwrite.utilsr   r   r   r9   rD   rQ   rT   r   r   r   <module>r]      sR    & ! -I +u I V$C $<)c )X!7 !!w !r   