
    -i                     n    d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 e G d de                      Z
dS )	    )	dataclass)Clip)Effect)CompositeVideoClip)Cropc                   \    e Zd ZU dZdZeed<   dZeed<   dZ	eed<   dZ
eed<   ded	efd
ZdS )FreezeRegiona!  Freezes one region of the clip while the rest remains animated.

    You can choose one of three methods by providing either `region`,
    `outside_region`, or `mask`.

    Parameters
    ----------

    t
      Time at which to freeze the freezed region.

    region
      A tuple (x1, y1, x2, y2) defining the region of the screen (in pixels)
      which will be freezed. You can provide outside_region or mask instead.

    outside_region
      A tuple (x1, y1, x2, y2) defining the region of the screen (in pixels)
      which will be the only non-freezed region.

    mask
      If not None, will overlay a freezed version of the clip on the current clip,
      with the provided mask. In other words, the "visible" pixels in the mask
      indicate the freezed region in the final picture.

    r   tNregionoutside_regionmaskclipreturnc                     | j         | j         \  }}}}|                    t          | j          g                              | j                                      |j                                      ||f          }t          ||g          S | j	        | j	        \  }}}}|                    t          | j	         g                              ||f          }	|                    | j                                      |j                  }t          ||	g          S | j
        \|                    | j                                      |j                                      | j
                  }t          ||g          S dS )zApply the effect to the clip.N)r
   )r   with_effectsr   to_ImageClipr
   with_durationdurationwith_positionr   r   r   	with_mask)
selfr   x1y1_x2_y2freezex2y2animated_regions
             [/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/video/fx/FreezeRegion.pyapplyzFreezeRegion.apply*   si   ;"#{BC!!4#5"677''t}--Bx((	  &tVn555 ,!0NBB"//t*+, mRH%%  &&&00>>t}MMF%v&?@@@Y"!!DF!++t}--49%% 
 &tVn555 #"    )__name__
__module____qualname____doc__r
   float__annotations__r   tupler   r   r   r!    r"   r    r	   r	   	   s          4 AuLLLFE NE   D$6$ 64 6 6 6 6 6 6r"   r	   N)dataclassesr   moviepy.Clipr   moviepy.Effectr   ,moviepy.video.compositing.CompositeVideoClipr   moviepy.video.fx.Cropr   r	   r*   r"   r    <module>r0      s    ! ! ! ! ! !       ! ! ! ! ! ! K K K K K K & & & & & & :6 :6 :6 :6 :66 :6 :6 :6 :6 :6r"   