+
    Ai?                     F    R R.t ^ RIt^RIHt ]! RR4      R 4       tR tR# )polygon_clippolygon_areaN)require
matplotlibz>=3.3c                   ^ RI HpHp VP                  \        P
                  ! W34      P                  RR7      pVP                  W#.WE..4      p	VP                  V	4      P                  4       ^ ,          p
V
R,          V
R,          3# )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.

)path
transformsT)closed)NNN    )r
      )
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   &&&&&&     W/var/www/html/photoedit/myenv/lib/python3.14/site-packages/skimage/_shared/_geometry.pyr   r      st    , ,99RYYx(**498D"B8 45I$$Y/;;=a@L|D111    c           
        \         P                  ! V 4      p \         P                  ! V4      pR\         P                  ! \         P                  ! VRR V R,          ,          VR,          V RR ,          ,
          4      4      ,          # )zCompute 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   NN)r   asarrayabssum)prpcs   &&r   r   r   '   s^     
BB	BB3B"R& 0RVb"g5EFGHHHr   )__all__numpyr   version_requirementsr   r   r    r   r   <module>r*      s6   >
*  ) 	w2  2<Ir   