Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/matplotlib/__pycache__/patheffects.cpython-37.pyc

169 lines
12 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<>]<5D>5<00>@s<>dZddlmZddlmZddlmZddlmZ Gdd<07>de
<EFBFBD>Z Gdd <09>d e<02>Z Gd
d <0B>d e <0B>Z Gd d <0A>d e <0B>ZGdd<0F>de<0E>ZGdd<11>de <0B>ZGdd<13>de<10>ZGdd<15>de <0B>ZGdd<17>de <0B>ZdS)z<>
Defines classes for path effects. The path effects are supported in
:class:`~matplotlib.text.Text`, :class:`~matplotlib.lines.Line2D`
and :class:`~matplotlib.patches.Patch`.
<EFBFBD>)<01> RendererBase)<01>colors)<01>patches)<01>
transformsc@s4eZdZdZd dd<04>Zdd<06>Zdd<08>Zd d
d <0B>Zd S)<0E>AbstractPathEffectz<74>
A base class for path effects.
Subclasses should override the ``draw_path`` method to add effect
functionality.
<20>ggcCs||_t<01><02>|_dS)z<>
Parameters
----------
offset : pair of floats
The offset to apply to the path, measured in points.
N)<04>_offset<65> mtransformsZAffine2D<32> _offset_trans)<02>self<6C>offset<65>r <00>>/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/patheffects.py<70>__init__szAbstractPathEffect.__init__cCs6|<01>|jd<00>}|<01>|jd<00>}||j<02><03><00>||<04>S)z(Apply the offset to the given transform.r<00>)<05>points_to_pixelsrr
<00>clear<61> translate)r <00>renderer<65> transformZoffset_xZoffset_yr r r<00>_offset_transformsz$AbstractPathEffect._offset_transformcCsl|<02><00>}|<02>dd<02>}|r$|jf|<03>xB|<02><03>D]6\}}t|d|d<02>}t|<06>s\td<04>|<04><01><01>||<05>q.W|S)z<>
Update the given GraphicsCollection with the given
dictionary of properties. The keys in the dictionary are used to
identify the appropriate set_ method on the gc.
<20>dashesN<73>set_zUnknown property {0})<08>copy<70>popZ
set_dashes<EFBFBD>items<6D>getattr<74>callable<6C>AttributeError<6F>format)r <00>gcZ new_gc_dictr<00>k<>vZ
set_methodr r r<00>
_update_gc&s   zAbstractPathEffect._update_gcNcCs t|t<01>r|j}|<01>||||<05>S)z<>
Derived should override this method. The arguments are the same
as :meth:`matplotlib.backend_bases.RendererBase.draw_path`
except the first argument is a renderer.
)<04>
isinstance<EFBFBD>PathEffectRenderer<65> _renderer<65> draw_path)r rr <00>tpath<74>affine<6E>rgbFacer r rr':s
zAbstractPathEffect.draw_path)r)N)<08>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrr#r'r r r rr s

rc@sZeZdZdZdd<03>Zdd<05>Zdd<07>Zdd d
<EFBFBD>Zd d <0C>Zd d<0E>Z dd<10>Z
dd<12>Z dd<14>Z dS)r%ax
Implements a Renderer which contains another renderer.
This proxy then intercepts draw calls, calling the appropriate
:class:`AbstractPathEffect` draw method.
.. note::
Not all methods have been overridden on this RendererBase subclass.
It may be necessary to add further methods to extend the PathEffects
capabilities further.
cCs||_||_dS)z<>
Parameters
----------
path_effects : iterable of :class:`AbstractPathEffect`
The path effects which this renderer represents.
renderer : :class:`matplotlib.backend_bases.RendererBase` instance
N)<02> _path_effectsr&)r <00> path_effectsrr r rrTs zPathEffectRenderer.__init__cCs
|j<00><01>S)N)r&<00>new_gc)r r r rr1`szPathEffectRenderer.new_gccCs|<00>||j<01>S)N)<02> __class__r&)r r0r r r<00>copy_with_path_effectdsz(PathEffectRenderer.copy_with_path_effectNcCs(x"|jD]}|<05>|j||||<04>qWdS)N)r/r'r&)r r r(r)r*<00> path_effectr r rr'gs zPathEffectRenderer.draw_pathc Os`t|j<01>dkr(tj|||||f|<05>|<06>Sx2|jD](}|<00>|g<01>}|j||||f|<05>|<06>q0WdS)Nr)<05>lenr/r<00> draw_markersr3) r r Z marker_pathZ marker_trans<6E>path<74>args<67>kwargsr4rr r rr6ls

  zPathEffectRenderer.draw_markerscOs\t|j<01>dkr&tj||||f|<04>|<05>Sx0|jD]&}|<00>|g<01>}|j|||f|<04>|<05>q.WdS)Nr)r5r/r<00>draw_path_collectionr3)r r Zmaster_transform<72>pathsr8r9r4rr r rr:s
   z'PathEffectRenderer.draw_path_collectioncCs |j<00>|<01>S)N)r&r)r Zpointsr r rr<00>sz#PathEffectRenderer.points_to_pixelsc Cs@|<00>||||||<07>\}} |<01><01>}
|<01>d<01>|j||| |
d<02>dS)Ng)r*)Z_get_text_path_transformZget_rgb<67> set_linewidthr') r r <00>x<>y<>s<>propZangleZismathr7r<00>colorr r r<00>_draw_text_as_path<74>s
  
z%PathEffectRenderer._draw_text_as_pathcCs$|dkrt|j|<01>St<02>||<01>SdS)N)Z
_text2pathZflipy<70>height<68>width)rr&<00>object<63>__getattribute__)r <00>namer r rrF<00>s z#PathEffectRenderer.__getattribute__)N) r+r,r-r.rr1r3r'r6r:rrBrFr r r rr%Gs  
r%c@seZdZdZdS)<03>Normalz<6C>
The "identity" PathEffect.
The Normal PathEffect's sole purpose is to draw the original artist with
no special path effect.
N)r+r,r-r.r r r rrH<00>srHcs*eZdZdZd<07>fdd<04> Zdd<06>Z<05>ZS)<08>Strokez0A line based PathEffect which re-draws a stroke.<2E>rrc st<00><00>|<01>||_dS)z<>
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)<03>superr<00>_gc)r r r9)r2r rr<00>s zStroke.__init__cCsH|<01><00>}|<06>|<02>|<00>||j<03>}|<00>||<04>}|<01>||||<05>|<06><06>dS)z0
draw the path with updated gc.
N)r1<00>copy_propertiesr#rLrr'<00>restore)r rr r(r)r*<00>gc0Ztransr r rr'<00>s 
 zStroke.draw_path)rJ)r+r,r-r.rr'<00> __classcell__r r )r2rrI<00>s rIc@seZdZdZdd<03>ZdS)<05>
withStrokezy
Adds a simple :class:`Stroke` and then draws the
original Artist to avoid needing to call :class:`Normal`.
cCs(t<00>||||||<05>|<01>||||<05>dS)N)rIr')r rr r(r)r*r r rr'<00>szwithStroke.draw_pathN)r+r,r-r.r'r r r rrQ<00>srQcs*eZdZdZd <09>fdd<06> Zdd<08>Z<05>ZS)
<EFBFBD>SimplePatchShadowz#A simple shadow via a filled patch.<2E><02><00><><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>333333<33>?c sJt<00><00>|<01>|dkr||_n t<03>|<02>|_|dkr4d}||_||_||_dS)a<>
Parameters
----------
offset : pair of floats
The offset of the shadow in points.
shadow_rgbFace : color
The shadow color.
alpha : float
The alpha transparency of the created shadow patch.
Default is 0.3.
http://matplotlib.1069221.n5.nabble.com/path-effects-question-td27630.html
rho : float
A scale factor to apply to the rgbFace color if `shadow_rgbFace`
is not specified. Default is 0.3.
**kwargs
Extra keywords are stored and passed through to
:meth:`AbstractPathEffect._update_gc`.
Ng333333<33>?)rKr<00>_shadow_rgbFace<63>mcolors<72>to_rgba<62>_alpha<68>_rhorL)r r <00>shadow_rgbFace<63>alpha<68>rhor9)r2r rr<00>s  zSimplePatchShadow.__init__c Cs<>|<00>||<04>}|<01><01>}|<07>|<02>|jdkr\|p.ddd<03>\}} }
||j| |j|
|jf} n|j} |<07>d<04>|<07>|j<07>|<07>d<05>|<00> ||j
<EFBFBD>}|<01> |||| <0B>|<07> <0C>dS)z<>
Overrides the standard draw_path to add the shadow offset and
necessary color changes for the shadow.
N)g<00>?g<00>?g<00>?<3F><00>noner) rr1rMrWr[<00>set_foreground<6E> set_alpharZr<r#rLr'rN) r rr r(r)r*<00>affine0rO<00>r<>g<>br\r r rr'<00>s 


 
zSimplePatchShadow.draw_path)rSNNrV)r+r,r-r.rr'rPr r )r2rrR<00>s
$rRc@seZdZdZdd<03>ZdS)<05>withSimplePatchShadowz<77>
Adds a simple :class:`SimplePatchShadow` and then draws the
original Artist to avoid needing to call :class:`Normal`.
cCs(t<00>||||||<05>|<01>||||<05>dS)N)rRr')r rr r(r)r*r r rr'szwithSimplePatchShadow.draw_pathN)r+r,r-r.r'r r r rrgsrgcs*eZdZdZd <09>fdd<06> Zdd<08>Z<05>ZS)
<EFBFBD>SimpleLineShadowzA simple shadow via a line.<2E>rTrUr!<00>333333<33>?c s>t<00><00>|<01>|dkr||_n t<03>|<02>|_||_||_||_dS)a<>
Parameters
----------
offset : pair of floats
The offset to apply to the path, in points.
shadow_color : color
The shadow color. Default is black.
A value of ``None`` takes the original artist's color
with a scale factor of `rho`.
alpha : float
The alpha transparency of the created shadow patch.
Default is 0.3.
rho : float
A scale factor to apply to the rgbFace color if `shadow_rgbFace`
is ``None``. Default is 0.3.
**kwargs
Extra keywords are stored and passed through to
:meth:`AbstractPathEffect._update_gc`.
N)rKr<00> _shadow_colorrXrYrZr[rL)r r Z shadow_colorr]r^r9)r2r rr$s  zSimpleLineShadow.__init__c Cs<>|<00>||<04>}|<01><01>}|<07>|<02>|jdkr`|<07><04>p2ddd<03>\}} }
||j| |j|
|jf} n|j} d} |<07>| <0B>|<07>|j<08>|<00> ||j
<EFBFBD>}|<01> |||| <0C>|<07> <0C>dS)z<>
Overrides the standard draw_path to add the shadow offset and
necessary color changes for the shadow.
N)g<00>?g<00>?g<00>?r_) rr1rMrkZget_foregroundr[rarbrZr#rLr'rN) r rr r(r)r*rcrOrdrerfr\Z
fill_colorr r rr'Cs 


 zSimpleLineShadow.draw_path)rir!rjrj)r+r,r-r.rr'rPr r )r2rrh"srhcs*eZdZdZd<07>fdd<04> Zdd<06>Z<05>ZS)<08>PathPatchEffectz|
Draws a :class:`~matplotlib.patches.PathPatch` instance whose Path
comes from the original PathEffect artist.
<20>rrc s"t<00>j|d<01>tjgf|<02>|_dS)a<>
Parameters
----------
offset : pair of floats
The offset to apply to the path, in points.
**kwargs
All keyword arguments are passed through to the
:class:`~matplotlib.patches.PathPatch` constructor. The
properties which cannot be overridden are "path", "clip_box"
"transform" and "clip_path".
)r N)rKr<00>mpatchesZ PathPatch<63>patch)r r r9)r2r rres zPathPatchEffect.__init__cCsX|<00>||<04>}||j_|j<01>|<04>|j<01>|<02><05><00>|<02><06>}|rH|jj|<06>|j<01>|<01>dS)N) rro<00>_pathZ set_transformZ set_clip_boxZget_clip_rectangleZ get_clip_pathZ set_clip_pathZdraw)r rr r(r)r*Z clip_pathr r rr'ts   zPathPatchEffect.draw_path)rm)r+r,r-r.rr'rPr r )r2rrl_srlN)r.Zmatplotlib.backend_basesrZ
matplotlibrrXrrnrr rErr%rHrIrQrRrgrhrlr r r r<00><module>s    :^
 C =