a
    s=ic                     @   s   d dl m  mZ ddlmZ ddlmZmZ ddlm	Z	m
Z
mZ ddlmZ ejdd	d
G dd deZG dd dee
Ze	jG dd de	ZdS )    N   )_api   )cairoFigureCanvasCairo)
_BackendWx_FigureCanvasWxBaseFigureFrameWx)NavigationToolbar2Wxz3.6z4FigureFrameWx(..., canvas_class=FigureCanvasWxCairo))alternativec                   @   s   e Zd Zdd ZdS )FigureFrameWxCairoc                 C   s   t | d|S )N)FigureCanvasWxCairo)selfZfig r   t/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/lib/python3.9/site-packages/matplotlib/backends/backend_wxcairo.py
get_canvas   s    zFigureFrameWxCairo.get_canvasN)__name__
__module____qualname__r   r   r   r   r   r   
   s   r   c                   @   s   e Zd ZdZdddZdS )r   a`  
    The FigureCanvas contains the figure and does event handling.

    In the wxPython backend, it is derived from wxPanel, and (usually) lives
    inside a frame instantiated by a FigureManagerWx. The parent window
    probably implements a wxSizer to control the displayed control size - but
    we give a hint as to our preferred minimum size.
    Nc                 C   sr   | j jjt}tjtjg|R  }| j	t
| | j j| j_| j | j t|| _d| _| j|d d S )NT)drawDC)ZfigureZbboxsizeZastypeintr   ZImageSurfaceZFORMAT_ARGB32Z	_rendererZset_contextContextZdpidrawwxcairoZBitmapFromImageSurfaceZbitmapZ_isDrawnZgui_repaint)r   r   r   Zsurfacer   r   r   r      s    zFigureCanvasWxCairo.draw)N)r   r   r   __doc__r   r   r   r   r   r      s   	r   c                   @   s   e Zd ZeZdS )_BackendWxCairoN)r   r   r   r   ZFigureCanvasr   r   r   r   r   &   s   r   )Zwx.lib.wxcairolibr    r   Zbackend_cairor   r   Z
backend_wxr   r   r	   r
   ZNavigationToolbar2WxCairo
deprecatedr   r   exportr   r   r   r   r   <module>   s   