Skip to content

Commit

Permalink
[3014606] fix set_alpha in backend_cairo
Browse files Browse the repository at this point in the history
svn path=/trunk/matplotlib/; revision=8412
  • Loading branch information
efiring committed Jun 11, 2010
1 parent 39cdb96 commit 7e247f6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/matplotlib/backends/backend_cairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def convert_path(ctx, path, transform):


def draw_path(self, gc, path, transform, rgbFace=None):
if len(path.vertices) > 18980:
raise ValueError("The Cairo backend can not draw paths longer than 18980 points.")
if len(path.vertices) > 18980:
raise ValueError("The Cairo backend can not draw paths longer than 18980 points.")

ctx = gc.ctx

Expand Down Expand Up @@ -315,9 +315,10 @@ def restore(self):


def set_alpha(self, alpha):
self._alpha = alpha
GraphicsContextBase.set_alpha(self, alpha)
_alpha = self.get_alpha()
rgb = self._rgb
self.ctx.set_source_rgba (rgb[0], rgb[1], rgb[2], alpha)
self.ctx.set_source_rgba (rgb[0], rgb[1], rgb[2], _alpha)


#def set_antialiased(self, b):
Expand Down

0 comments on commit 7e247f6

Please sign in to comment.