• File: backend_mixed.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyc
  • Date Modified: 07/22/2015 11:41 PM
  • File size: 4.91 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

`3Lc@sJddlmZddlmZddlmZdefdYZdS(i(t
frombuffer(tRendererAgg(tprocess_figure_for_rasterizingtMixedModeRenderercBsDeZdZdddZdjZdZdZdZ	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.
    cCs|dkrt}n||_||_||_||_|jsLt||_d|_	d|_
||_||_|j
|dS(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.)
        iN(tNoneRt_raster_renderer_classt_widtht_heighttdpitoption_image_nocompositetAssertionErrort_vector_renderert_raster_renderert_rasterizingtfiguret_bbox_inches_restoret_set_current_renderer(tselfRtwidththeightRtvector_renderertraster_renderer_classtbbox_inches_restore((sT/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyt__init__
s										s
        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
        start_filter stop_filter draw_gouraud_triangle
        draw_gouraud_triangles option_scale_image
        cCsd||_x<|jD]1}t||rt||t||qqW|j|_|j|_dS(N(t	_renderert_methodsthasattrtsetattrtgetattrtstart_rasterizingtstop_rasterizing(Rtrenderertmethod((sT/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyR@s	 cCs|jj|j|jrCt|j|jdd}||_n|jdkr|j|j|j|j|j|j|_	|j
|j	n|jd7_dS(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.
        tmodetpngiiN(Rtset_dpiRRRR
RRRRR(Rtr((sT/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyRJs				)cCsd|jd8_|jdkr |j|j|j|j|j|j}}|jj\}}|\}}}}|dkr|dkrt|||t	}	t
|	_|	j|j
j}
|j
j|
t||jdt||||jd|	nd|_t
|_n|jjd|jr`t|j|jdd}||_ndS(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.
        iigR@iHR!tpdfN(R
RRRRRRttostring_rgba_minimizedRtTruetFalsetis_grayscalet
flipud_outRtnew_gct
draw_imagetfloatRRR#RR(RRRtbuffertboundstltbtwthtimagetgcR$((sT/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyRfs0	!	
	
					N(
t__name__t
__module__t__doc__RRtsplitRRRR(((sT/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyRs0	
	N(tmatplotlib._imageRtmatplotlib.backends.backend_aggRtmatplotlib.tight_bboxRtobjectR(((sT/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/backends/backend_mixed.pyt<module>s