Ë
    Eü´j˜  ã                   ó&   — d dl mZ  G d„ de«      Zy)é    )ÚEffectc                   ó,   — e Zd ZdZ	 	 	 	 	 	 	 dd„Zd„ Zy)ÚScrolla³  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                 óf   — || _         || _        || _        || _        || _        || _        || _        y )N)ÚwÚhÚx_speedÚy_speedÚx_startÚy_startÚapply_to)Úselfr   r   r	   r
   r   r   r   s           úU/root/workspace/ytshorts/venv/lib/python3.12/site-packages/moviepy/video/fx/Scroll.pyÚ__init__zScroll.__init__   s5   € ð ˆŒØˆŒØˆŒØˆŒØˆŒØˆŒØ ˆ�ó    c                 ó   ‡ ‡‡— ‰ j                   €|j                   ‰ _         ‰ j                  €|j                  ‰ _        ‰ j                  dz
  Š‰ j                   dz
  Šˆ ˆˆfd„}|j                  |‰ j                  ¬«      S )zApply the effect to the clip.é   c                 ób  •— t        t        dt        ‰‰j                  t	        ‰j
                  |z  «      z   «      «      «      }t        t        dt        ‰‰j                  t	        ‰j                  |z  «      z   «      «      «      } | |«      ||‰j                  z   …||‰j                  z   …f   S )Nr   )
ÚintÚmaxÚminr   Úroundr	   r   r
   r   r   )Ú	get_frameÚtÚxÚyr   Úx_maxÚy_maxs       €€€r   ÚfilterzScroll.apply.<locals>.filter4   s�   ø€ Ü”C˜œ3˜u d§l¡l´U¸4¿<¹<È!Ñ;KÓ5LÑ&LÓMÓNÓOˆAÜ”C˜œ3˜u d§l¡l´U¸4¿<¹<È!Ñ;KÓ5LÑ&LÓMÓNÓOˆAÙ˜Q“<  A¨¯©¡J °°A¸¿¹±J°Ð >Ñ?Ð?r   )r   )r   r   Ú	transformr   )r   Úclipr   r   r   s   `  @@r   ÚapplyzScroll.apply)   sd   ú€ à�6‰6ˆ>Ø—V‘VˆDŒFà�6‰6ˆ>Ø—V‘VˆDŒFà—‘˜‘
ˆØ—‘˜‘
ˆö	@ð
 �~‰~˜f¨t¯}©}ˆ~Ó=Ð=r   )NNr   r   r   r   Úmask)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r"   © r   r   r   r      s(   „ ñð( Ø
ØØØØØó!ó$>r   r   N)Úmoviepy.Effectr   r   r(   r   r   ú<module>r*      s   ðÝ !ô5>ˆVõ 5>r   