Skip to content

Commit a9dc013

Browse files
committed
One more step to go.
1 parent af0e5ee commit a9dc013

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/matplotlib/text.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def draw(self, renderer):
750750
textobj._draw_bbox(renderer, posx, posy)
751751

752752
color = textobj.get_color()
753-
props = textobj._fontproperties
753+
prop = textobj._fontproperties
754754
gc = renderer.new_gc()
755755
gc.set_foreground(color)
756756
gc.set_alpha(textobj.get_alpha())
@@ -777,20 +777,19 @@ def draw(self, renderer):
777777
textrenderer = PathEffectRenderer(
778778
textobj.get_path_effects(), renderer)
779779
if textobj.get_usetex():
780-
textrenderer._draw_text_as_path(gc, x, y, clean_line,
781-
prop, angle,
782-
ismath="TeX")
783-
else:
784-
textrenderer._draw_text_as_path(gc, x, y, clean_line,
785-
props, angle, ismath)
780+
ismath = "TeX"
781+
path, transform = textrenderer._get_text_path_transform(x, y, clean_line, prop, angle, ismath)
782+
color = gc.get_rgb()
783+
gc.set_linewidth(0.0)
784+
textrenderer.draw_path(gc, path, transform, rgbFace=color)
786785
else:
787786
if textobj.get_usetex():
788787
renderer.draw_tex(gc, x, y, clean_line,
789-
props, angle,
788+
prop, angle,
790789
mtext=mtext)
791790
else:
792791
renderer.draw_text(gc, x, y, clean_line,
793-
props, angle,
792+
prop, angle,
794793
ismath=ismath, mtext=mtext)
795794

796795
gc.restore()

0 commit comments

Comments
 (0)