Ńň
8tJc @ sJ d d k l Z d d k l Z d d k l Z d e f d YZ d S( i˙˙˙˙( t
frombuffer( t RendererAgg( t process_figure_for_rasterizingt MixedModeRendererc B sD e Z d Z d d d Z d i Z d Z d Z d Z RS( s&
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.
c C sy | d j o
t } n | | _ | | _ | | _ | | _ | | _ d | _ d | _ | | _ | | _
| i | d S( s
figure: The figure instance.
width: The width of the canvas in logical units
height: The height of the canvas in logical units
dpi: The dpi of the canvas
vector_renderer: An instance of a subclass of RendererBase
that will be used for the vector drawing.
raster_renderer_class: 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.)
i N( t NoneR t _raster_renderer_classt _widtht _heightt dpit _vector_renderert _raster_renderert _rasterizingt figuret _bbox_inches_restoret _set_current_renderer( t selfR t widtht heightR t vector_renderert raster_renderer_classt bbox_inches_restore( ( sG /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_mixed.pyt __init__
s
sI
close_group draw_image draw_markers draw_path
draw_path_collection draw_quad_mesh draw_tex draw_text
finalize flipy get_canvas_width_height get_image_magnification
get_texmanager get_text_width_height_descent new_gc open_group
option_image_nocomposite points_to_pixels strip_math
c C sf | | _ x> | i D]3 } t | | o t | | t | | q q W| i | _ | i | _ d S( N( t _renderert _methodst hasattrt setattrt getattrt start_rasterizingt stop_rasterizing( R t renderert method( ( sG /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_mixed.pyR > s
!c C sŤ | i i | i | i o( t | i | i d d } | | _ n | i d j oC | i | i | i | i | i | i | _ | i
| i n | i d 7_ d S( s
Enter "raster" mode. All subsequent drawing commands (until
stop_rasterizing is called) will be drawn with the raster
backend.
If start_rasterizing is called multiple times before
stop_rasterizing is called, this method has no effect.
t modet pngi i N( R t set_dpiR R
R R R R R R
R ( R t r( ( sG /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_mixed.pyR H s
)c C sh | i d 8_ | i d j o| i | i | i | i | i | i } } | i i \ } } | \ } } } } | d j o | d j o{ t | | | t } t
| _ | i | i
i t t | | i d t t | | | | i d | d n d | _ t
| _ n | i i d | i o( t | i | i d d }
|
| _ n d S( s9
Exit "raster" mode. All of the drawing that was done since
the last start_rasterizing command will be copied to the
vector backend by calling draw_image.
If stop_rasterizing is called multiple times before
start_rasterizing is called, this method has no effect.
i i g R@iH R t pdfN( R R R R R R R
t tostring_rgba_minimizedR t Truet Falset is_grayscalet
flipud_outR t
draw_imaget intt floatR R R! R
R ( R R R t buffert boundst lt bt wt ht imageR" ( ( sG /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_mixed.pyR d s* !
#"
N(
t __name__t
__module__t __doc__R R t splitR R R R ( ( ( sG /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_mixed.pyR s .
N( t matplotlib._imageR t matplotlib.backends.backend_aggR t matplotlib.tight_bboxR t objectR ( ( ( sG /usr/lib64/python2.6/site-packages/matplotlib/backends/backend_mixed.pyt