
    hL                        S SK Jr  S SKJr  S SKJr  SSKJr   " S S\R                  5      r	 " S S	\	5      r
 " S
 S\	5      r " S S\	5      r " S S\	5      r " S S\	5      rg)    )annotations)Sequence)Any   )Imagec                  R    \ rS rSr% SrS\S'   S
S jrSS jr        SS jrSr	g	)	Transform   zIBase class for other transforms defined in :py:mod:`~PIL.ImageTransform`.zImage.Transformmethodc                    Xl         g Ndata)selfr   s     D/var/www/html/env/lib/python3.13/site-packages/PIL/ImageTransform.py__init__Transform.__init__   s    	    c                2    U R                   U R                  4$ r   )r   r   )r   s    r   getdataTransform.getdata   s    {{DII%%r   c                N    U R                  5       u  pEUR                  " XU40 UD6$ )z?Perform the transform. Called from :py:meth:`.Image.transform`.)r   	transform)r   sizeimageoptionsr   r   s         r   r   Transform.transform"   s'     ||~tT=W==r   r   N)r   zSequence[Any]returnNone)r   z%tuple[Image.Transform, Sequence[int]])r   ztuple[int, int]r   Image.Imager   r   r   r    )
__name__
__module____qualname____firstlineno____doc____annotations__r   r   r   __static_attributes__ r   r   r	   r	      s@    S&	>	> 	> 		>
 
	>r   r	   c                  D    \ rS rSrSr\R                  R                  rSr	g)AffineTransform.   a;  
Define an affine image transform.

This function takes a 6-tuple (a, b, c, d, e, f) which contain the first
two rows from the inverse of an affine transform matrix. For each pixel
(x, y) in the output image, the new value is taken from a position (a x +
b y + c, d x + e y + f) in the input image, rounded to nearest pixel.

This function can be used to scale, translate, rotate, and shear the
original image.

See :py:meth:`.Image.transform`

:param matrix: A 6-tuple (a, b, c, d, e, f) containing the first two rows
    from the inverse of an affine transform matrix.
r(   N)
r!   r"   r#   r$   r%   r   r	   AFFINEr   r'   r(   r   r   r*   r*   .   s    " __##Fr   r*   c                  D    \ rS rSrSr\R                  R                  rSr	g)PerspectiveTransformC   a  
Define a perspective image transform.

This function takes an 8-tuple (a, b, c, d, e, f, g, h). For each pixel
(x, y) in the output image, the new value is taken from a position
((a x + b y + c) / (g x + h y + 1), (d x + e y + f) / (g x + h y + 1)) in
the input image, rounded to nearest pixel.

This function can be used to scale, translate, rotate, and shear the
original image.

See :py:meth:`.Image.transform`

:param matrix: An 8-tuple (a, b, c, d, e, f, g, h).
r(   N)
r!   r"   r#   r$   r%   r   r	   PERSPECTIVEr   r'   r(   r   r   r.   r.   C   s      __((Fr   r.   c                  D    \ rS rSrSr\R                  R                  rSr	g)ExtentTransformW   a  
Define a transform to extract a subregion from an image.

Maps a rectangle (defined by two corners) from the image to a rectangle of
the given size. The resulting image will contain data sampled from between
the corners, such that (x0, y0) in the input image will end up at (0,0) in
the output image, and (x1, y1) at size.

This method can be used to crop, stretch, shrink, or mirror an arbitrary
rectangle in the current image. It is slightly slower than crop, but about
as fast as a corresponding resize operation.

See :py:meth:`.Image.transform`

:param bbox: A 4-tuple (x0, y0, x1, y1) which specifies two points in the
    input image's coordinate system. See :ref:`coordinate-system`.
r(   N)
r!   r"   r#   r$   r%   r   r	   EXTENTr   r'   r(   r   r   r2   r2   W   s    $ __##Fr   r2   c                  D    \ rS rSrSr\R                  R                  rSr	g)QuadTransformm   aV  
Define a quad image transform.

Maps a quadrilateral (a region defined by four corners) from the image to a
rectangle of the given size.

See :py:meth:`.Image.transform`

:param xy: An 8-tuple (x0, y0, x1, y1, x2, y2, x3, y3) which contain the
    upper left, lower left, lower right, and upper right corner of the
    source quadrilateral.
r(   N)
r!   r"   r#   r$   r%   r   r	   QUADr   r'   r(   r   r   r6   r6   m   s     __!!Fr   r6   c                  D    \ rS rSrSr\R                  R                  rSr	g)MeshTransform~   z
Define a mesh image transform.  A mesh transform consists of one or more
individual quad transforms.

See :py:meth:`.Image.transform`

:param data: A list of (bbox, quad) tuples.
r(   N)
r!   r"   r#   r$   r%   r   r	   MESHr   r'   r(   r   r   r:   r:   ~   s     __!!Fr   r:   N)
__future__r   collections.abcr   typingr    r   ImageTransformHandlerr	   r*   r.   r2   r6   r:   r(   r   r   <module>rB      sa    # $  >++ >.$i $*)9 )($i $,"I ""
"I 
"r   