
    W|h                     &    S SK Jr   " S S\5      rg)    )Effectc                   6    \ rS rSrSr       SS jrS rSrg)Scroll   a  Effect that scrolls horizontally or vertically a clip, e.g. to make end credits

Parameters
----------
w, h
  The width and height of the final clip. Default to clip.w and clip.h

x_speed, y_speed
  The speed of the scroll in the x and y directions.

x_start, y_start
  The starting position of the scroll in the x and y directions.


apply_to
  Whether to apply the effect to the mask too.
Nc                 X    Xl         X l        X0l        X@l        XPl        X`l        Xpl        g )N)whx_speedy_speedx_starty_startapply_to)selfr   r	   r
   r   r   r   r   s           Q/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/Scroll.py__init__Scroll.__init__   s'          c                    ^ ^^ T R                   c  UR                   T l         T R                  c  UR                  T l        T R                  S-
  mT R                   S-
  mU UU4S jnUR                  UT R                  S9$ )zApply the effect to the clip.   c                 ^  > [        [        S[        TTR                  [	        TR
                  U-  5      -   5      5      5      n[        [        S[        TTR                  [	        TR                  U-  5      -   5      5      5      nU " U5      X3TR                  -   2X"TR                  -   24   $ )Nr   )
intmaxminr   roundr
   r   r   r	   r   )	get_frametxyr   x_maxy_maxs       r   filterScroll.apply.<locals>.filter4   s    C3udllU4<<!;K5L&LMNOAC3udllU4<<!;K5L&LMNOAQ<JJ >??r   )r   )r	   r   	transformr   )r   clipr!   r   r    s   `  @@r   applyScroll.apply)   sd    66>VVDF66>VVDF

	@
 ~~ft}}~==r   )r   r	   r   r
   r   r   r   )NNr   r   r   r   mask)__name__
__module____qualname____firstlineno____doc__r   r%   __static_attributes__ r   r   r   r      s(    ( 
!$>r   r   N)moviepy.Effectr   r   r.   r   r   <module>r0      s    !5>V 5>r   