ó ù)°Uc @s~dZddlmZddlmZddljZdefd„ƒYZdefd„ƒYZ d efd „ƒYZ d e fd „ƒYZ ddljZ d efd„ƒYZ de fd„ƒYZedkrzeƒeddgddggƒedd'd(deddddddƒdd d!d"ƒZeje d#dd$d%ƒgƒejje d#d&d$d%ƒe ƒgƒndS()s¡ Defines classes for path effects. The path effects are supported in :class:`~matplotlib.text.Text` and :class:`~matplotlib.patches.Patch` matplotlib.text.Text. iÿÿÿÿ(t RendererBase(tMixedModeRendererNt_BasecBsJeZdZd„Zd„Zd„Zdd„Zed„Zd„Z RS(sN A base class for PathEffect. Derived must override draw_path method. cCstt|ƒjƒdS(s initializtion. N(tsuperRt__init__(tself((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRscCs¡|jƒ}|jddƒ}|r4|j|nxf|jƒD]X\}}t|d|dƒ}|dks|t|ƒ rtd|ƒ‚n||ƒqAW|S(Ntdashestset_sUnknown property %s(tcopytpoptNonet set_dashest iteritemstgetattrtcallabletAttributeError(Rtgct new_gc_dictRtktvt set_method((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyt _update_gcs cCs|j||||ƒdS(sn Derived should override this method. The argument is same as *draw_path* method of :class:`matplotlib.backend_bases.RendererBase` except the first argument is a renderer. The base definition is :: def draw_path(self, renderer, gc, tpath, affine, rgbFace): renderer.draw_path(gc, tpath, affine, rgbFace) N(t draw_path(RtrendererRttpathtaffinetrgbFace((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR)s sTeX!c Cs)|j|||||||ddƒdS(NtismathtTeX(t_draw_text_as_path( RRRtxtytstproptangleR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pytdraw_tex5sc Cs&|j||||||||ƒdS(N(R( RRRRRR R!R"R((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyt draw_text8sc Cst|tƒr|j}ntj|||||||ƒ\} } |jƒd } |jdƒ|j||| | d| ƒdS(NigR(t isinstanceRt _rendererRt_get_text_path_transformtget_rgbt set_linewidthR( RRRRRR R!R"Rtpatht transformtcolor((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR;s    ( t__name__t __module__t__doc__RRRR#tFalseR$R(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR s    tNormalcBseZdZRS(s$ path effect with no effect (R-R.R/(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR1[stStrokecBs eZdZd„Zd„ZRS(s* stroke the path with updated gc. cKs tt|ƒjƒ||_dS(s± The path will be stroked with its gc updated with the given keyword arguments, i.e., the keyword arguments should be valid gc parameter values. N(RR2Rt_gc(Rtkwargs((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRfscCsR|jƒ}|j|ƒ|j||jƒ}|j|||dƒ|jƒdS(s/ draw the path with update gc. N(tnew_gctcopy_propertiesRR3RR trestore(RRRRRRtgc0((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRos   (R-R.R/RR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR2as t withStrokecBseZdZd„ZRS(sK Same as Stroke, but add a stroke with the original gc at the end. cCs6tj||||||ƒ|j||||ƒdS(N(R2R(RRRRRR((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRƒs(R-R.R/R(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR9}stSimplePatchShadowcBs)eZdZdddd„Zd„ZRS(s simple shadow iiþÿÿÿgffffffæ?cKsJtt|ƒjƒ||_||_||_||_tjƒ|_ dS(s N( RRRt _offset_xyt_shadow_rgbFacet _patch_alphaR3t mtransformstAffine2Dt _offset_tran(Rt offset_xytshadow_rgbFacet patch_alphaR4((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRs     cCs,|j|jdƒ}|j|jdƒ}||jjƒj||ƒ}|jƒ} | j|ƒ|jdkr¼|d \} } } d} | | } | | } | | } | | | f}n |j}| j dƒ| j d|j ƒ| j dƒ|j | |jƒ} |j| |||ƒ| jƒdS(s iiig333333Ó?tnonegð?N(tpoints_to_pixelsR;R@tcleart translateR5R6R<R tset_foregroundt set_alphaR=R)RR3RR7(RRRRRRtoffset_xtoffset_ytaffine0R8trtgtbtrhoRB((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRs&        (iiþÿÿÿN(R-R.R/R RR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR:‹s twithSimplePatchShadowcBseZdZd„ZRS(s simple shadow cCsstj||||||ƒ|jƒ}|j|ƒ|j|jƒ|jƒ|j||||ƒ|jƒdS(N(R:RR5R6RIt get_alphaR=R7(RRRRRRtgc1((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRÃs   (R-R.R/R(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRQ¾st__main__iiittestgð?git arrowpropst arrowstyles->tconnectionstyletangle3tlwtsizei thatcentert linewidtht foregroundtwi(gð?gð?(gi(R/tmatplotlib.backend_basesRt!matplotlib.backends.backend_mixedRtmatplotlib.transformst transformstobjectRR1R2R9R>R:RQR-tclftimshowtannotatetdictttxttset_path_effectst arrow_patch(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyts&N 3