
    W|h                     H    S SK Jr  S SKJr  S SKJr  \ " S S\5      5       rg)    )	dataclass)Clip)Effectc                   @    \ rS rSr% Sr\\S'   \\S'   S\S\4S jr	Sr
g	)
SlideIn   av  Makes the clip arrive from one side of the screen.

Only works when the clip is included in a CompositeVideoClip,
and if the clip has the same size as the whole composition.

Parameters
----------

clip : moviepy.Clip.Clip
  A video clip.

duration : float
  Time taken for the clip to be fully visible

side : str
  Side of the screen where the clip comes from. One of
  'top', 'bottom', 'left' or 'right'.

Examples
--------

.. code:: python

    from moviepy import *

    clips = [... make a list of clips]
    slided_clips = [
        CompositeVideoClip([clip.with_effects([vfx.SlideIn(1, "left")])])
        for clip in clips
    ]
    final_clip = concatenate_videoclips(slided_clips, padding=-1)

    clip = ColorClip(
        color=(255, 0, 0), duration=1, size=(300, 300)
    ).with_fps(60)
    final_clip = CompositeVideoClip([clip.with_effects([vfx.SlideIn(1, "right")])])
durationsideclipreturnc                    ^ ^^ UR                   u  mmU U4S jU U4S jUU 4S jUU 4S jS.nUR                  UT R                     5      $ )zApply the effect to the clip.c                 F   > [        STU TR                  -  S-
  -  5      S4$ Nr      centerminr	   tselfws    R/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/SlideIn.py<lambda>SlideIn.apply.<locals>.<lambda>6   s$    s1a1t}}+<q+@&ABHM    c                 F   > [        STSU TR                  -  -
  -  5      S4$ r   maxr	   r   s    r   r   r   7   s$    AqADMM0A,A'B CXNr   c                 F   > S[        STU TR                  -  S-
  -  5      4$ Nr   r   r   r   r   hr   s    r   r   r   8   s$    hAqA4E4I/J(KLr   c                 F   > S[        STSU TR                  -  -
  -  5      4$ r    r   r!   s    r   r   r   9   s$    3q!q1t}};L7L2M+N Or   )leftrighttopbottom)sizewith_positionr
   )r   r   pos_dictr"   r   s   `  @@r   applySlideIn.apply2   s?    yy1MNLO	
 !!(499"566r    N)__name__
__module____qualname____firstlineno____doc__float__annotations__strr   r+   __static_attributes__r-   r   r   r   r      s'    $L O
I
7$ 
74 
7r   r   N)dataclassesr   moviepy.Clipr   moviepy.Effectr   r   r-   r   r   <module>r:      s)    !  ! 47f 47 47r   