162 lines (136 with data), 11.9 kB
@header@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="matplotlib.html"><font color="#ffffff">matplotlib</font></a>.<a href="matplotlib.backends.html"><font color="#ffffff">backends</font></a>.backend_paint</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="/matplotlib/backends/backend_paint.py">/matplotlib/backends/backend_paint.py</a></font></td></tr></table>
<p><tt>This ia a paint (libart) backend<br>
<br>
You can select it as a backend with<br>
<br>
import matplotlib<br>
matplotlib.use('Paint')<br>
<br>
REQUIREMENTS<br>
<br>
backend_paint requires pypaint-0.??, which in turn requires<br>
libart and freetype1</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="paint.html">paint</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_paint.html#FigureCanvasPaint">FigureCanvasPaint</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="matplotlib.backends.backend_paint.html#RendererPaint">RendererPaint</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="FigureCanvasPaint">class <strong>FigureCanvasPaint</strong></a>(<a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="FigureCanvasPaint-draw"><strong>draw</strong></a>(self)</dt><dd><tt>Render the figure using <a href="#RendererPaint">RendererPaint</a> instance renderer</tt></dd></dl>
<dl><dt><a name="FigureCanvasPaint-print_figure"><strong>print_figure</strong></a>(self, filename, dpi<font color="#909090">=300</font>, facecolor<font color="#909090">='w'</font>, edgecolor<font color="#909090">='w'</font>)</dt><dd><tt>Render the figure to hardcopy using self.<strong>renderer</strong> as the<br>
renderer if neccessary</tt></dd></dl>
<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#FigureCanvasBase">matplotlib.backend_bases.FigureCanvasBase</a>:<br>
<dl><dt><a name="FigureCanvasPaint-__init__"><strong>__init__</strong></a>(self, figure)</dt></dl>
<dl><dt><a name="FigureCanvasPaint-switch_backends"><strong>switch_backends</strong></a>(self, FigureCanvasClass)</dt><dd><tt>instantiate an instance of FigureCanvasClass<br>
<br>
This is used for backend switching, eg, to instantiate a<br>
FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is<br>
not done, so any changes to one of the instances (eg, setting<br>
figure size or line props), will be reflected in the other</tt></dd></dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="RendererPaint">class <strong>RendererPaint</strong></a>(<a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>The renderer handles all the drawing primitives using a graphics<br>
context instance that controls the colors/styles<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="RendererPaint-__init__"><strong>__init__</strong></a>(self, width, height, dpi)</dt><dd><tt>creates a new image</tt></dd></dl>
<dl><dt><a name="RendererPaint-compute_text_offsets"><strong>compute_text_offsets</strong></a>(self, t)</dt><dd><tt>Return the (x,y) offsets to adjust for the alignment<br>
specifications</tt></dd></dl>
<dl><dt><a name="RendererPaint-dash_path"><strong>dash_path</strong></a>(self, gc, path)</dt><dd><tt>Add dashes to the path and return it if dashes are set</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_arc"><strong>draw_arc</strong></a>(self, gcEdge, rgbFace, x, y, width, height, angle1, angle2)</dt><dd><tt>Draw an arc centered at x,y with width and height and angles<br>
from 0.0 to 360.0.<br>
<br>
If rgbFace is not None, fill the rectangle with it. gcEdge<br>
is a GraphicsContext instance</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_line"><strong>draw_line</strong></a>(self, gc, x1, y1, x2, y2)</dt><dd><tt>Draw a single line from x1,y1 to x2,y2</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_lines"><strong>draw_lines</strong></a>(self, gc, x, y)</dt><dd><tt>x and y are equal length arrays, draw lines connecting each<br>
point in x, y</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_point"><strong>draw_point</strong></a>(self, gc, x, y)</dt><dd><tt>Draw a single point at x,y</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_polygon"><strong>draw_polygon</strong></a>(self, gcEdge, rgbFace, points)</dt><dd><tt>Draw a polygon. points is a len vertices tuple, each element<br>
giving the x,y coords a vertex.<br>
<br>
If rgbFace is not None, fill the rectangle with it. gcEdge<br>
is a GraphicsContext instance</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_rectangle"><strong>draw_rectangle</strong></a>(self, gcEdge, rgbFace, x, y, width, height)</dt><dd><tt>Draw a rectangle at lower left x,y with width and height.<br>
<br>
If rgbFace is not None, fill the rectangle with it. gcEdge<br>
is a GraphicsContext instance</tt></dd></dl>
<dl><dt><a name="RendererPaint-draw_text"><strong>draw_text</strong></a>(self, gc, x, y, t)</dt><dd><tt>Render the text using the <a href="#RendererPaint">RendererPaint</a> instance</tt></dd></dl>
<dl><dt><a name="RendererPaint-get_paint_color"><strong>get_paint_color</strong></a>(self, rgb)</dt><dd><tt>returns a paint color object based on the given rgb tuple</tt></dd></dl>
<dl><dt><a name="RendererPaint-get_text_extent"><strong>get_text_extent</strong></a>(self, t)</dt><dd><tt>Return the ink extent of the text as Bound2D instance</tt></dd></dl>
<dl><dt><a name="RendererPaint-get_text_scale"><strong>get_text_scale</strong></a>(self)</dt><dd><tt>Return the scale factor for fontsize taking screendpi and pixels per<br>
inch into account</tt></dd></dl>
<dl><dt><a name="RendererPaint-points_to_pixels"><strong>points_to_pixels</strong></a>(self, points)</dt></dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>fontd</strong> = {}</dl>
<hr>
Methods inherited from <a href="matplotlib.backend_bases.html#RendererBase">matplotlib.backend_bases.RendererBase</a>:<br>
<dl><dt><a name="RendererPaint-new_gc"><strong>new_gc</strong></a>(self)</dt><dd><tt>Return an instance of a GraphicsContextBase</tt></dd></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-error_msg"><strong>error_msg</strong></a> = error_msg_paint(msg, *args)</dt><dd><tt>Signal an error condition -- in a GUI, popup a error dialog</tt></dd></dl>
<dl><dt><a name="-error_msg_paint"><strong>error_msg_paint</strong></a>(msg, *args)</dt><dd><tt>Signal an error condition -- in a GUI, popup a error dialog</tt></dd></dl>
<dl><dt><a name="-new_figure_manager"><strong>new_figure_manager</strong></a> = new_figure_manager_paint(num, *args)</dt><dd><tt>Add a new figure num (default autoincrement). For GUI<br>
backends, you'll need to instantiate a new window and embed<br>
the figure in it.</tt></dd></dl>
<dl><dt><a name="-new_figure_manager_paint"><strong>new_figure_manager_paint</strong></a>(num, *args)</dt><dd><tt>Add a new figure num (default autoincrement). For GUI<br>
backends, you'll need to instantiate a new window and embed<br>
the figure in it.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>False</strong> = False<br>
<strong>PIXELS_PER_INCH</strong> = 96<br>
<strong>True</strong> = True<br>
<strong>division</strong> = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)<br>
<strong>fontManager</strong> = <matplotlib.backends.ttf_font_manager.FontManager instance></td></tr></table>
@footer@