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

)Uc@s~dZddlmZddlmZddljZdefdYZdefdYZ	d	efd
YZ
de
fdYZddljZd
efdYZ
de
fdYZedkrzeeddgddggedd'd(dedddddddd d!d"Zejed#dd$d%gejje
d#d&d$d%e	gndS()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_BasecBsJeZdZdZdZdZddZedZdZ	RS(sN
    A base class for PathEffect. Derived must override draw_path method.
    cCstt|jdS(s 
        initializtion.
        N(tsuperRt__init__(tself((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRscCs|j}|jdd}|r4|j|nxf|jD]X\}}t|d|d}|dks|t|rtd|n||qAW|S(Ntdashestset_sUnknown property %s(tcopytpoptNonet
set_dashest	iteritemstgetattrtcallabletAttributeError(Rtgctnew_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|||||||dddS(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|tr|j}ntj|||||||\}	}
|jd }|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 eZdZdZdZRS(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|jdS(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
withStrokecBseZdZdZRS(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.pyRs(R-R.R/R(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR9}stSimplePatchShadowcBs)eZdZddddZdZRS(s
    simple shadow
    iigffffff?cKsJtt|j||_||_||_||_tj|_	dS(s	
        N(
RRRt
_offset_xyt_shadow_rgbFacet_patch_alphaR3tmtransformstAffine2Dt_offset_tran(Rt	offset_xytshadow_rgbFacetpatch_alphaR4((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRs				cCs,|j|jd}|j|jd}||jjj||}|j}	|	j||jdkr|d \}
}}d}
|
|
}
|
|}|
|}|
||f}n	|j}|	j	d|	j
d|j|	jd|j
|	|j}	|j|	||||	jdS(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&



	

(iiN(R-R.R/R
RR(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyR:stwithSimplePatchShadowcBseZdZdZRS(s
    simple shadow
    cCsstj|||||||j}|j||j|j|j|j|||||jdS(N(R:RR5R6RIt	get_alphaR=R7(RRRRRRtgc1((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRs
(R-R.R/R(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyRQst__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_effectstarrow_patch(((sI/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/patheffects.pyt<module>s&N3