o
    h                     @  s|   d dl mZ d dlmZmZ d dlmZmZ d dlZ	er4d dl
Z
d dlmZ d dlmZmZmZmZmZ G dd deZdS )	    )annotations)ABCabstractmethod)TYPE_CHECKINGAnyN)	ArrayLike)CoordinateArray
FillReturnFillType
LineReturnLineTypec                   @  s   e Zd ZdZdKddZe			
	dLdMddZe							dNdOdd Ze			
	!	"dPdQd(d)Ze			dRdSd,d-Z				dTdUd1d2Z
			dTdVd5d6ZedWdXd;d<ZedYd>d?ZedZd@dAZedTd[dCdDZe			E	F	7d\d]dIdJZdS )^Rendererz"Abstract base class for renderers.xr   yreturn'tuple[CoordinateArray, CoordinateArray]c                 C  s6   t |}t |}|jdkrt ||\}}||fS )N   )npasarrayndimmeshgrid)selfr   r    r   k/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/contourpy/util/renderer.py_grid_as_2d   s
   


zRenderer._grid_as_2dr   C0ffffff?filledr	   	fill_typeFillType | straxr   colorstralphafloatNonec                 C     d S Nr   )r   r   r   r    r!   r#   r   r   r   r         	zRenderer.filledblack皙?Npoint_color
str | Nonequad_as_tri_alphac                 C  r&   r'   r   )r   r   r   r    r!   r#   r+   r-   r   r   r   grid%      zRenderer.grid      ?r   linesr   	line_typeLineType | str	linewidthc                 C  r&   r'   r   )r   r1   r2   r    r!   r#   r4   r   r   r   r1   2   s   
zRenderer.linesz'ArrayLike | np.ma.MaskedArray[Any, Any]c                 C  r&   r'   r   )r   r   r   r5   r    r!   r   r   r   mask>   r(   zRenderer.maskmulti_filledlist[FillReturn]kwargsc                 K  V   |dur||d< t |D ]\}}|du rd|d  |d< | j|||fi | qdS )a  Plot multiple sets of filled contours on a single axes.

        Args:
            multi_filled (list of filled contour arrays): Multiple filled contour sets as returned
                by :meth:`.ContourGenerator.multi_filled`.
            fill_type (FillType or str): Type of filled data as returned by
                :attr:`~.ContourGenerator.fill_type`, or string equivalent.
            ax (int or Renderer-specific axes or figure object, optional): Which axes to plot on,
                default ``0``.
            color (str or None, optional): If a string color then this same color is used for all
                filled contours. If ``None``, the default, then the filled contour sets use colors
                from the ``tab10`` colormap in order, wrapping around to the beginning if more than
                10 sets of filled contours are rendered.
            kwargs: All other keyword argument are passed on to
                :meth:`.Renderer.filled` unchanged.

        .. versionadded:: 1.3.0
        Nr!   C
   )	enumerater   )r   r8   r   r    r!   r:   ir   r   r   r   r8   I      zRenderer.multi_filledmulti_lineslist[LineReturn]c                 K  r;   )a  Plot multiple sets of contour lines on a single axes.

        Args:
            multi_lines (list of contour line arrays): Multiple contour line sets as returned by
                :meth:`.ContourGenerator.multi_lines`.
            line_type (LineType or str): Type of line data as returned by
                :attr:`~.ContourGenerator.line_type`, or string equivalent.
            ax (int or Renderer-specific axes or figure object, optional): Which axes to plot on,
                default ``0``.
            color (str or None, optional): If a string color then this same color is used for all
                lines. If ``None``, the default, then the line sets use colors from the ``tab10``
                colormap in order, wrapping around to the beginning if more than 10 sets of lines
                are rendered.
            kwargs: All other keyword argument are passed on to
                :meth:`Renderer.lines` unchanged.

        .. versionadded:: 1.3.0
        Nr!   r<   r=   )r>   r1   )r   rA   r2   r    r!   r:   r?   r1   r   r   r   rA   j   r@   zRenderer.multi_linesFfilenametransparentboolc                 C  r&   r'   r   )r   rC   rD   r   r   r   save      zRenderer.save
io.BytesIOc                 C  r&   r'   r   r   r   r   r   save_to_buffer   rG   zRenderer.save_to_bufferc                 C  r&   r'   r   rI   r   r   r   show   rG   zRenderer.showtitlec                 C  r&   r'   r   )r   rL   r    r!   r   r   r   rL      rG   zRenderer.titlegreen.1ffmtquad_as_tric                 C  r&   r'   r   )r   r   r   r5   r    r!   rO   rP   r   r   r   z_values   r/   zRenderer.z_values)r   r   r   r   r   r   )r   r   r   )r   r	   r   r   r    r   r!   r"   r#   r$   r   r%   )r   r)   r*   Nr   )r   r   r   r   r    r   r!   r"   r#   r$   r+   r,   r-   r$   r   r%   )r   r   r0   r   )r1   r   r2   r3   r    r   r!   r"   r#   r$   r4   r$   r   r%   )r   r)   )r   r   r   r   r5   r6   r    r   r!   r"   r   r%   )r   N)r8   r9   r   r   r    r   r!   r,   r:   r   r   r%   )rA   rB   r2   r3   r    r   r!   r,   r:   r   r   r%   )F)rC   r"   rD   rE   r   r%   )r   rH   )r   r%   )rL   r"   r    r   r!   r,   r   r%   )r   rM   rN   F)r   r   r   r   r5   r   r    r   r!   r"   rO   r"   rP   rE   r   r%   )__name__
__module____qualname____doc__r   r   r   r.   r1   r7   r8   rA   rF   rJ   rK   rL   rQ   r   r   r   r   r      sZ    

%!r   )
__future__r   abcr   r   typingr   r   numpyr   ionumpy.typingr   contourpy._contourpyr   r	   r
   r   r   r   r   r   r   r   <module>   s    