ó
    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r\\S'   Sr\\S'   Sr	\\S'   Sr
\\S'   Sr\\S'   Sr\\S	'   Sr\\S
'   Sr\\S'   S\S\4S jrSrg)ÚCropé   a  Effect to crop a clip to get a new clip in which just a rectangular
subregion of the original clip is conserved. `x1,y1` indicates the top left
corner and `x2,y2` is the lower right corner of the cropped region. All
coordinates are in pixels. Float numbers are accepted.

To crop an arbitrary rectangle:

>>> Crop(x1=50, y1=60, x2=460, y2=275)

Only remove the part above y=30:

>>> Crop(y1=30)

Crop a rectangle that starts 10 pixels left and is 200px wide

>>> Crop(x1=10, width=200)

Crop a rectangle centered in x,y=(300,400), width=50, height=150 :

>>> Crop(x_center=300, y_center=400, width=50, height=150)

Any combination of the above should work, like for this rectangle
centered in x=300, with explicit y-boundaries:

>>> Crop(x_center=300, width=400, y1=100, y2=600)

NÚx1Úy1Úx2Úy2ÚwidthÚheightÚx_centerÚy_centerÚclipÚreturnc                 óf  ^ • T R                   (       a,  T R                  b  T R                  T R                   -   T l        O<T R                   (       a+  T R                  b  T R                  T R                   -
  T l        T R                  (       a,  T R                  b  T R                  T R                  -   T l        O<T R                  (       a+  T R
                  b  T R
                  T R                  -
  T l        T R                  (       aC  T R                  T R                   S-  -
  T R                  T R                   S-  -   sT l        T l        T R                  (       aC  T R                  T R                  S-  -
  T R                  T R                  S-  -   sT l        T l        T R                  =(       d    ST l        T R                  =(       d    ST l        T R                  =(       d    UR                  S   T l        T R
                  =(       d    UR                  S   T l        UR                  U 4S jS/S9$ )zApply the effect to the clip.é   r   é   c                 ó²   >• U [        TR                  5      [        TR                  5      2[        TR                  5      [        TR                  5      24   $ )N)Úintr
   r   r	   r   )ÚframeÚselfs    €ÚO/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/Crop.pyÚ<lambda>ÚCrop.apply.<locals>.<lambda>L   s<   ø€ ˜%ÜD—G‘G“œs 4§7¡7›|Ð+¬S°·±«\¼CÀÇÁ»LÐ-HÐHòó    Úmask)Úapply_to)
r   r	   r   r   r
   r   r   r   ÚsizeÚimage_transform)r   r   s   ` r   ÚapplyÚ
Crop.apply.   s  ø€ à::˜$Ÿ'™'Ñ-Ø—g‘g §
¡
Ñ*ˆDGØZZ˜DŸG™GÑ/Ø—g‘g §
¡
Ñ*ˆDŒGà;;˜4Ÿ7™7Ñ.Ø—g‘g §¡Ñ+ˆDGØ[[˜TŸW™WÑ0Ø—g‘g §¡Ñ+ˆDŒGà==à—‘ §
¡
¨Q¡Ñ.Ø—‘ §
¡
¨Q¡Ñ.ð ˆDŒGT”Wð
 ==à—‘ §¡¨a¡Ñ/Ø—‘ §¡¨a¡Ñ/ð ˆDŒGT”Wð
 —'‘'—,˜QˆŒØ—'‘'—,˜QˆŒØ—'‘'×)˜TŸY™Y q™\ˆŒØ—'‘'×)˜TŸY™Y q™\ˆŒà×#Ñ#ôð Xð	 $ð 
ð 	
r   )r	   r   r
   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r	   r   Ú__annotations__r
   r   r   r   r   r   r   r   r"   Ú__static_attributes__© r   r   r   r      sh   ‡ ñð8 €BˆƒNØ€BˆƒNØ€BˆƒNØ€BˆƒNØ€Eˆ3ÓØ€FˆCÓØ€HˆcÓØ€HˆcÓð"
˜$ð "
 4÷ "
r   r   N)Údataclassesr   Úmoviepy.Clipr   Úmoviepy.Effectr   r   r+   r   r   Ú<module>r/      s,   ðÝ !å Ý !ð ôH
ˆ6ó H
ó ñH
r   