
    W|hK                     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	)
SlideOut   as  Makes the clip goes away by 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 goes. 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.SlideOut(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.SlideOut(1, "right")])])
durationsideclipreturnc                   ^ ^^^ UR                   c  [        S5      eUR                  u  mmUR                   T R                   -
  mU UU4S jU UU4S jUU U4S jUU U4S jS.nUR                  UT R                     5      $ )zApply the effect to the clip.zAttribute 'duration' not setc                 H   > [        STU T-
  * TR                  -  -  5      S4$ Nr   centerminr	   tselftsws    S/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/SlideOut.py<lambda> SlideOut.apply.<locals>.<lambda>:   s%    s1aQV9t}}+D&EFQ    c                 F   > [        STU T-
  TR                  -  -  5      S4$ r   maxr	   r   s    r   r   r   ;   s#    AqQVt}},D'E FQr   c                 H   > S[        STU T-
  * TR                  -  -  5      4$ Nr   r   r   r   hr   r   s    r   r   r   <   s%    hAqa"fI4M/N(OPr   c                 F   > S[        STU T-
  TR                  -  -  5      4$ r    r   r!   s    r   r   r   =   s#    3q!B$--7O2P+Q Rr   )leftrighttopbottom)r	   
ValueErrorsizewith_positionr
   )r   r   pos_dictr"   r   r   s   `  @@@r   applySlideOut.apply2   sg    == ;<<yy1]]T]]*QQPR	
 !!(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)    !  ! 87v 87 87r   