Ñò 8”tJc @ sìdZddklZddkZddkZddkZddklZddkl Z ddk l Z l Z l Z lZlZlZlZlZeZd„Zdefd „ƒYZd e fd „ƒYZd ee fd „ƒYZdS(s Render to qt from agg iÿÿÿÿ(tdivisionN(tFigure(tFigureCanvasAgg(tQtCoretQtGuitFigureManagerQTtFigureCanvasQTtshowtdraw_if_interactivetbackend_versiontNavigationToolbar2QTcO sJto dGHn|idtƒ}|||Ž}t|ƒ}t||ƒS(s. Create a new figure manager instance s backend_qtagg.new_figure_managert FigureClass(tDEBUGtpopRtFigureCanvasQTAggR(tnumtargstkwargsR tthisFigtcanvas((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pytnew_figure_managers   tNavigationToolbar2QTAggcB seZd„ZRS(cC s t|ƒS(N(R(tselftfig((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyt _get_canvass(t__name__t __module__R(((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyRstFigureManagerQTAggcB seZd„ZRS(cC sNtiddjo dGHn.tiddjot||ƒ}nd}|S(Nttoolbartclassics Classic toolbar is not supportedttoolbar2(t matplotlibtrcParamsRtNone(RRtparentR((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyt _get_toolbar"s  (RRR#(((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyR!sRcB sGeZdZd„Zd„Zd„Zd„Zdd„Zd„Z RS(s­ The canvas the figure renders into. Calls the draw and print fig methods, creates the renderers, etc... Public attribute figure - A Figure instance cC sfto dG|GHnti||ƒti||ƒt|_g|_t|_|i t i i ƒdS(NsFigureCanvasQtAgg: ( R Rt__init__RtFalsetdrawRecttrecttTruetreplott setAttributeRtQttWA_OpaquePaintEvent(Rtfigure((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyR$7s    cC s ||_t|_|iƒdS(N(R'R(R&trepaint(RR'((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyt drawRectangle@s  cC satodG|G|iƒGHnt|iƒtjo3|ioti|ƒntii tii jo|i i i ƒ}n|i i iƒ}ti||i i|i itiiƒ}ti|ƒ}|itiddƒtii|ƒƒ|io^|ititiidtiiƒƒ|i|id|id|id|idƒn|i ƒnå|i}|i!\}}}} t"|ƒt"|ƒ} t"| ƒt"|ƒ} t"|ƒ| } |i#|ƒ} | i$ƒ}ti|| | tiiƒ}tii|ƒ} ti|ƒ}|iti||i i| ƒ| ƒ|i ƒt%|_t%|_dS(s· Draw to the Agg backend and then copy the image to the qt.drawable. In Qt, all drawing should be done inside of here when a widget is shown onscreen. sFigureCanvasQtAgg.paintEvent: iiiiN(&R tget_width_heightttypeR)tboolRtdrawRtQSysInfot ByteOrdert LittleEndiantrenderert _renderert tostring_bgrat tostring_argbRtQImagetwidththeightt Format_ARGB32tQPaintert drawPixmaptQPointtQPixmapt fromImageR&tsetPentQPenR+tblacktDotLineR'tendtextentstinttcopy_from_bboxtto_string_argbR%(Rtet stringBuffertqImagetptbboxtltbtrtttwthtregtpixmap((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyt paintEventEs@  ( (6  &  cC s8to dG|GHnt|_ti|ƒ|iƒdS(sG Draw the figure when xwindows is ready for the update sFigureCanvasQtAgg.drawN(R R(R)RR3tupdate(R((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyR3{s    cC sL||_|i\}}}}||}|i||ii|||ƒdS(s) Blit the region in bbox N(R)tboundsR[R7R=(RRQRRRSRVRWRU((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pytblit…s  cO s!ti|||Ž|iƒdS(N(Rt print_figureR3(RRR((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyR^sN( RRt__doc__R$R/RZR3R!R]R^(((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyR-s  6 (R_t __future__RtostsysRtmatplotlib.figureRt backend_aggRt backend_qt4RRRRRRR R R%R RRRR(((sH/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_qt4agg.pyts :