+
     i;  c                  s    R t ^ RIHt ^ RIHtHtHt ^RIHtH	t	H
t
HtHt ^RIHtHt  ! R R4      t ! R R4      t ! R	 R
4      t ! R R4      tR# )z]
(Experimental) WCK-style drawing interface operations

.. seealso:: :py:mod:`PIL.ImageDraw`
)annotations)AnyAnyStrBinaryIO)Image
ImageColor	ImageDraw	ImageFont	ImagePath)CoordsStrOrBytesPathc                  s*    ] tR t^!tRtRR R lltRtR# )Penz"Stores an outline color and width.c               s(    V ^8  d   QhRRRRRRRR/# )   colorstrwidthintopacityreturnNone Zformat   "5/usr/lib64/python3.14/site-packages/PIL/ImageDraw2.py__annotate__ZPen.__annotate__$   s(      c # C $     c                	sH    \         P                  ! V4      V n        W n        R # N)r   getrgbr   r   )selfr   r   r      &&&&r   __init__ZPen.__init__$   s    &&u-

r   )r   r   N)i      __name__
__module____qualname____firstlineno____doc__r   __static_attributes__r   r   r   r   r   !   s    , r   r   c                  s*    ] tR t^)tRtRR R lltRtR# )BrushzStores a fill colorc               $    V ^8  d   QhRRRRRR/# )r   r   r   r   r   r   r   r   r   r   r   r   ZBrush.__annotate__,   s!     . .c .C .$ .r   c                	s<    \         P                  ! V4      V n        R # r   )r   r   r   )r   r   r      &&&r   r   ZBrush.__init__,   s    &&u-
r   )r   N)r   r    r   r   r   r'   r'   )   s    . .r   r'   c                  s*    ] tR t^0tRtRR R lltRtR# )Fontz Stores a TrueType font and colorc               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   filezStrOrBytesPath | BinaryIOsizefloatr   r   r   r   r   r   r   ZFont.__annotate__3   s,     3 33 93AF3	3r   c                	sr    \         P                  ! V4      V n        \        P                  ! W#4      V n        R # r   )r   r   r   r   Ztruetypefont)r   r   r,   r-   r   r   r   ZFont.__init__3   s(      &&u-
&&t2	r   )r   r/   N)i   r    r   r   r   r*   r*   0   s    *3 3r   r*   c                  s    ] tR t^;tRtR R R lltR R ltR!R R lltR	 R
 ltR R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltRtR# )"Drawz,
(Experimental) WCK-style drawing interface
Nc               r+   )	r   imagezImage.Image | strr-   z"tuple[int, int] | list[int] | Noner   z&float | tuple[float, ...] | str | Noner   r   r   r   r   r   r   Draw.__annotate__@   s8     V V V 1V 6	V
 
Vr   c                	s    \        V\        4      '       d)   Vf   Rp\        V4      h\        P                  ! WV4      p\
        P                  ! V4      V n        Wn        R V n	        R # )Nz>If image argument is mode string, size must be a list or tuple)

isinstancer   Z
ValueErrorr   Znewr   r0   drawr1   	transform)r   r1   r-   r   Zmsg   &&&& r   r   ZDraw.__init__@   sQ     eS!!|V o%IIe51ENN5)	
QUr   c               s    V ^8  d   QhRR/# )r   r   zImage.Imager   r   r   r   r   r2   O   s      { r   c                	s    V P                   # r   )r1   )r   s   &r   flushZ
Draw.flushO   s    zzr   c               s0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   opr   xyr	   penPen | Brush | NonebrushzBrush | Pen | Nonekwargsr   r   r   r   r   r   r   r   r2   R   sF     "- "-"- "-  	"-
 ""- "- 
"-r   c                	s   R ;rg^p\        V\        4      '       d   VP                  pVP                  pM.\        V\        4      '       d   VP                  pVP                  p\        V\        4      '       d   VP                  pM"\        V\        4      '       d   VP                  pV P
                  '       d4   \        P                  ! V4      p	V	P                  V P
                  4       T	pVR9   d   VP                  RV4       M$VP                  RV4       VP                  RV4       VR8X  d   VP                  RV4       \        V P                  V4      ! V3/ VB  R # )Nlinefilloutliner   )arcr>   )r3   r   r   r   r'   r5   r   PathZ
setdefaultZgetattrr4   )
r   r8   r9   r:   r<   r=   r@   r?   r   paths
   &&&&&,    r   renderZDraw.renderR   s    c3iiGIIEs##kkGKKEeU##;;DU##99D>>>>>"%DNN4>>*B fg.fd+i1<gu-		2r,V,r   c               s     V ^8  d   QhRRRR/# )r   offsettuple[float, float]r   r   r   r   r   r   r   r2   v   s     8 8#6 84 8r   c                s(    Vw  r#^^ V^ ^V3V n         R# )zSets a transformation offset.N)r5   )r   rE   ZxoffsetZyoffsets   &&  r   settransformZDraw.settransformv   s    #QAw7r   c               0    V ^8  d   QhRRRRRRRRRR	R
R/# r   r9   r	   r:   r;   startr.   endoptionsr   r   r   r   r   r   r   r   r2   {   sN     D DD  D 	D
 D D 
Dr   c                8    V P                   ! RW.VO5RVRV/  R# )z
Draws an arc (a portion of a circle outline) between the start and end
angles, inside the given bounding box.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.arc`
rA   rJ   rK   NrD   r   r9   r:   rJ   rK   rL      &&&&&*r   rA   ZDraw.arc{   s!     	E2CWCECsCr   c               rH   rI   r   r   r   r   r   r2      sN     F FF  F 	F
 F F 
Fr   c                rM   )z
Same as :py:meth:`~PIL.ImageDraw2.Draw.arc`, but connects the end points
with a straight line.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.chord`
chordrJ   rK   NrN   rO   rP   r   rQ   Z
Draw.chord   s!     	GREwEeEEr   c               r+   	r   r9   r	   r:   r;   rL   r   r   r   r   r   r   r   r   r2      s)     2 2& 2'9 2S 2T 2r   c                0    V P                   ! RW.VO5!   R# )zj
Draws an ellipse inside the given bounding box.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.ellipse`
ellipseNrN   r   r9   r:   rL      &&&*r   rT   ZDraw.ellipse   s     	Ir11r   c               r+   rR   r   r   r   r   r   r2      s)     / /v /$6 /# /$ /r   c                rS   )zp
Draws a line between the coordinates in the ``xy`` list.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.line`
r>   NrN   rU   rV   r   r>   Z	Draw.line   s     	FB.g.r   c               rH   rI   r   r   r   r   r   r2      sN     I II  I 	I
 I I 
Ir   c                rM   )z
Same as arc, but also draws straight lines between the end points and the
center of the bounding box.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.pieslice`
pieslicerJ   rK   NrN   rO   rP   r   rW   ZDraw.pieslice   s!     	JH'HHCHr   c               r+   rR   r   r   r   r   r   r2      s)     2 2& 2'9 2S 2T 2r   c                rS   )z
Draws a polygon.

The polygon outline consists of straight lines between the given
coordinates, plus a straight line between the last and the first
coordinate.


.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.polygon`
polygonNrN   rU   rV   r   rX   ZDraw.polygon   s     	Ir11r   c               r+   rR   r   r   r   r   r   r2      s)     4 4F 4); 4s 4t 4r   c                rS   )zO
Draws a rectangle.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.rectangle`
	rectangleNrN   rU   rV   r   rY   ZDraw.rectangle   s     	K373r   c               r+   )	r   r9   rF   textr   r/   r*   r   r   r   r   r   r   r   r2      s/     
B 
B* 
B& 
B 
B 
Br   c                s    V P                   '       d4   \        P                  ! V4      pVP                  V P                   4       TpV P                  P	                  WVP
                  VP                  R7       R# )z_
Draws the string at the given position.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.text`
)r/   r?   N)r5   r   rB   r4   rZ   r/   r   r   r9   rZ   r/   rC   r6   r   rZ   Z	Draw.text   sN     >>>>>"%DNN4>>*B		rdiidjjAr   c               r+   )	r   r9   rF   rZ   r   r/   r*   r   z!tuple[float, float, float, float]r   r   r   r   r   r2      s,     < <%<-3<;?<	*<r   c                s    V P                   '       d4   \        P                  ! V4      pVP                  V P                   4       TpV P                  P	                  WVP
                  R7      # )z
Returns bounding box (in pixels) of given text.

:return: ``(left, top, right, bottom)`` bounding box

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textbbox`
r/   )r5   r   rB   r4   textbboxr/   r[   r6   r   r]   ZDraw.textbbox   sN     >>>>>"%DNN4>>*Byy!!"!;;r   c               r(   )r   rZ   r   r/   r*   r   r.   r   r   r   r   r   r2      s!     : :v :T :e :r   c                sN    V P                   P                  WP                  R7      # )z
Returns length (in pixels) of given text.
This is the amount by which following text should be offset.

.. seealso:: :py:meth:`PIL.ImageDraw.ImageDraw.textlength`
r\   )r4   
textlengthr/   )r   rZ   r/   r)   r   r^   ZDraw.textlength   s      yy##Dyy#99r   )r4   r1   r5   )NNr   )r!   r"   r#   r$   r%   r   r7   rD   rG   rA   rQ   rT   r>   rW   rX   rY   rZ   r]   r^   r&   r   r   r   r0   r0   ;   sX    V"-H8
D F 2/I 24
B< : :r   r0   N)r%   Z
__future__r    Ztypingr   r   r   Z r   r   r   r   r   Z_typingr	   r
   r   r'   r*   r0   r   r   r   <module>r_      sH   (
 # ( ( @ @ + . .3 3x: x:r   