Repository navigation
Fix for issue4024 #4532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue4024 #4532
Changes from 10 commits
9fb3aef
d57c775
fa06dae
484fe03
af0e5ee
a9dc013
ff933ec
bf64c3c
d429c71
2d71357
60946ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ | |
|
|
||
| from matplotlib.backend_bases import RendererBase | ||
| from matplotlib.textpath import TextPath | ||
| from matplotlib.colors import colorConverter | ||
|
|
||
|
|
||
| def _process_text_args(override, fontdict=None, **kwargs): | ||
|
|
@@ -749,8 +750,10 @@ def draw(self, renderer): | |
| if textobj._bbox_patch: | ||
| textobj._draw_bbox(renderer, posx, posy) | ||
|
|
||
| color = textobj.get_color() | ||
| color = colorConverter.to_rgb(color) | ||
| prop = textobj._fontproperties | ||
| gc = renderer.new_gc() | ||
| gc.set_foreground(textobj.get_color()) | ||
| gc.set_alpha(textobj.get_alpha()) | ||
| gc.set_url(textobj._url) | ||
| textobj._set_gc_clip(gc) | ||
|
|
@@ -771,19 +774,23 @@ def draw(self, renderer): | |
| clean_line, ismath = textobj.is_math_text(line) | ||
|
|
||
| if textobj.get_path_effects(): | ||
| from matplotlib.patheffects import PathEffectRenderer | ||
| textrenderer = PathEffectRenderer( | ||
| textobj.get_path_effects(), renderer) | ||
| path_effects = textobj.get_path_effects() | ||
| if textobj.get_usetex(): | ||
| ismath = "TeX" | ||
| path, transform = renderer._get_text_path_transform(x, y, clean_line, prop, angle, ismath) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pep8 is choking on this line.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True. I have modified the line to follow the PEP8 conventions. -Michiel. On Wed, 6/17/15, Thomas A Caswell notifications@github.com wrote: Subject: Re: [matplotlib] Fix for issue4024 (#4532) In lib/matplotlib/text.py:
pep8 is choking on this line. — |
||
| gc.set_linewidth(0.0) | ||
| for path_effect in path_effects: | ||
| path_effect.draw_path(renderer, gc, path, transform, | ||
| rgbFace=color) | ||
| else: | ||
| textrenderer = renderer | ||
|
|
||
| if textobj.get_usetex(): | ||
| textrenderer.draw_tex(gc, x, y, clean_line, | ||
| textobj._fontproperties, angle, | ||
| gc.set_foreground(color) | ||
| if textobj.get_usetex(): | ||
| renderer.draw_tex(gc, x, y, clean_line, | ||
| prop, angle, | ||
| mtext=mtext) | ||
| else: | ||
| textrenderer.draw_text(gc, x, y, clean_line, | ||
| textobj._fontproperties, angle, | ||
| else: | ||
| renderer.draw_text(gc, x, y, clean_line, | ||
| prop, angle, | ||
| ismath=ismath, mtext=mtext) | ||
|
|
||
| gc.restore() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
to_rgba?