Skip to content

Commit 996c677

Browse files
committed
Merged revisions 8630 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v1_0_maint ........ r8630 | efiring | 2010-08-14 11:50:49 -1000 (Sat, 14 Aug 2010) | 2 lines fix bug in last commit: patch with no boundary was transparent ........ svn path=/trunk/matplotlib/; revision=8631
1 parent ce52093 commit 996c677

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/matplotlib/patches.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ def draw(self, renderer):
369369
renderer.open_group('patch', self.get_gid())
370370
gc = renderer.new_gc()
371371

372-
gc.set_alpha(self._edgecolor[3])
373372
gc.set_foreground(self._edgecolor, isRGB=True)
374373

375374
lw = self._linewidth
@@ -388,6 +387,10 @@ def draw(self, renderer):
388387
if rgbFace[3] == 0:
389388
rgbFace = None # (some?) renderers expect this as no-fill signal
390389

390+
gc.set_alpha(self._edgecolor[3])
391+
if self._edgecolor[3] == 0:
392+
gc.set_alpha(self._facecolor[3])
393+
391394
if self._hatch:
392395
gc.set_hatch(self._hatch )
393396

@@ -3855,7 +3858,6 @@ def draw(self, renderer):
38553858
renderer.open_group('patch', self.get_gid())
38563859
gc = renderer.new_gc()
38573860

3858-
gc.set_alpha(self._edgecolor[3])
38593861
gc.set_foreground(self._edgecolor, isRGB=True)
38603862

38613863
lw = self._linewidth
@@ -3873,6 +3875,10 @@ def draw(self, renderer):
38733875
if rgbFace[3] == 0:
38743876
rgbFace = None # (some?) renderers expect this as no-fill signal
38753877

3878+
gc.set_alpha(self._edgecolor[3])
3879+
if self._edgecolor[3] == 0:
3880+
gc.set_alpha(self._facecolor[3])
3881+
38763882
if self._hatch:
38773883
gc.set_hatch(self._hatch )
38783884

0 commit comments

Comments
 (0)