+
    iX                     F    ^ RI t^ RIHt ^RIHt ^ RIHt  ! R R4      tR# )    N)cbook)RendererAgg)process_figure_for_rasterizingc                   @   a  ] tR t^t o RtRR ltR tR tR tRt	V t
R# )	MixedModeRenderera  
A helper class to implement a renderer that switches between
vector and raster drawing.  An example may be a PDF writer, where
most things are drawn with PDF vector commands, but some very
complex objects, such as quad meshes, are rasterised and then
output as images.
Nc                    Vf   \         pW`n        W n        W0n        W@n        WPn        RV n        Wn        VP                  V n        Wpn	        WPn
        R# )a  
Parameters
----------
figure : `~matplotlib.figure.Figure`
    The figure instance.
width : float
    The width of the canvas in logical units
height : float
    The height of the canvas in logical units
dpi : float
    The dpi of the canvas
vector_renderer : `~matplotlib.backend_bases.RendererBase`
    An instance of a subclass of
    `~matplotlib.backend_bases.RendererBase` that will be used for the
    vector drawing.
raster_renderer_class : `~matplotlib.backend_bases.RendererBase`
    The renderer class to use for the raster drawing.  If not provided,
    this will use the Agg backend (which is currently the only viable
    option anyway.)

N)r   _raster_renderer_class_width_heightdpi_vector_renderer_raster_rendererfigure_figdpi_bbox_inches_restore	_renderer)selfr   widthheightr   vector_rendererraster_renderer_classbbox_inches_restores   &&&&&&&&ځ/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/backends/backend_mixed.py__init__MixedModeRenderer.__init__   sP    0 !($/!&;# / $
 zz$7!(    c                .    \        V P                  V4      # )N)getattrr   )r   attrs   &&r   __getattr__MixedModeRenderer.__getattr__>   s     t~~t,,r   c                ~   V P                   V P                  n         V P                  '       d'   \        V P                  V P                  4      pWn        V P	                  V P
                  V P                   ,          V P                  V P                   ,          V P                   4      V n        V P                  V n        R# )z
Enter "raster" mode.  All subsequent drawing commands (until
`stop_rasterizing` is called) will be drawn with the raster backend.
N)	r   r   r   r   r	   r
   r   r   r   )r   rs   & r   start_rasterizing#MixedModeRenderer.start_rasterizingG   s     (($$$.t{{/3/H/HJA()% $ ; ;KK $,,txx"7!C..r   c           	     B   V P                   V n        V P                  V P                  ,          p\        P
                  ! V P                  P                  4       4      p\        P                  ! VR,          4      w  r4W#V3,          pVP                  '       d   V P                  P                  4       pV P                  P                  VVP                  V P                  ,          V P                  ,          WP                  ,
          V P                  ,          V P                  ,          VRRR1,          4       RV n        V P                  V P                   n        V P"                  '       d4   \%        V P                   V P"                  V P                  4      pWpn        R# R# )z
Exit "raster" mode.  All of the drawing that was done since
the last `start_rasterizing` call will be copied to the
vector backend by calling draw_image.
N).   )r   r   r   r   npasarrayr   buffer_rgbar   _get_nonzero_slicessizenew_gc
draw_imagestartr   stopr   r   r   )r   r   imgslice_yslice_xcropped_imggcr#   s   &       r   stop_rasterizing"MixedModeRenderer.stop_rasterizingW   s.    ..(jj..::<= 44S[A7*+&&(B NN%%,txx7,,&$,,6ADbD!	#
 !% ,,$$$.t{{/3/H/H/3||=A )*%	 %r   )
r   r   r   r   r	   r   r   r
   r   r   )NN)__name__
__module____qualname____firstlineno____doc__r   r    r$   r7   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s$     ,)\-/  *  *r   r   )	numpyr)   
matplotlibr   backend_aggr   matplotlib._tight_bboxr   r    r   r   <module>rF      s      $ Ao* o*r   