ó
    Å“,ju  ã                   óD   • S S/r SSKrSSKJr  \" SS5      S 5       rS	 rg)
Úpolygon_clipÚpolygon_areaé    Né   )ÚrequireÚ
matplotlibz>=3.3c                 ó  • SSK JnJn  UR                  [        R
                  " X45      R                  SS9nUR                  X#/XE//5      n	UR                  U	5      R                  5       S   n
U
SS2S4   U
SS2S4   4$ )a¿  Clip a polygon to the given bounding box.

Parameters
----------
rp, cp : (K,) ndarray of double
    Row and column coordinates of the polygon.
(r0, c0), (r1, c1) : double
    Top-left and bottom-right coordinates of the bounding box.

Returns
-------
r_clipped, c_clipped : (L,) ndarray of double
    Coordinates of clipped polygon.

Notes
-----
This makes use of Sutherland-Hodgman clipping as implemented in
AGG 2.4 and exposed in Matplotlib.

r   )ÚpathÚ
transformsT)ÚclosedNr   )
r   r	   r
   ÚPathÚnpÚvstackÚTÚBboxÚclip_to_bboxÚto_polygons)ÚrpÚcpÚr0Úc0Úr1Úc1r	   r
   ÚpolyÚ	clip_rectÚpoly_clippeds              Ú§C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\skimage/_shared/_geometry.pyr   r      s|   € ÷, ,à�9‰9”R—Y’Y ˜xÓ(×*Ñ*°4ˆ9Ð8€DØ—‘ " ¨B¨8Ð 4Ó5€IØ×$Ñ$ YÓ/×;Ñ;Ó=¸aÑ@€Làš˜1˜Ñ˜|ªA¨q¨DÑ1Ð1Ð1ó    c           
      óÞ   • [         R                  " U 5      n [         R                  " U5      nS[         R                  " [         R                  " USS U SS -  USS U SS -  -
  5      5      -  $ )z¯Compute the area of a polygon.

Parameters
----------
pr, pc : (K,) array of float
    Polygon row and column coordinates.

Returns
-------
a : float
    Area of the polygon.
g      à?Néÿÿÿÿr   )r   ÚasarrayÚabsÚsum)ÚprÚpcs     r   r   r   '   sb   € ô 
�Š�B‹€BÜ	�Š�B‹€BØ”—’œŸš  3 B ¨"¨Q¨R¨&Ñ 0°R¸¸°V¸bÀÀ"¸gÑ5EÑFÓGÓHÑHÐHr   )Ú__all__Únumpyr   Úversion_requirementsr   r   r   © r   r   Ú<module>r)      s6   ðØ˜>Ð
*€ã å )ñ 	ˆ�wÓñ2ó  ð2ó<Ir   