Fix opacity of rect, circle, ellipse objects. Fix #289.

This commit is contained in:
kangax 2012-10-20 20:12:19 +02:00
parent 39efd11c4c
commit 1744469063
3 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@
_render: function(ctx, noTransform) {
ctx.beginPath();
// multiply by currently set alpha (the one that was set by path group where this object is contained, for example)
ctx.globalAlpha *= this.opacity;
ctx.globalAlpha = this.group ? (ctx.globalAlpha * this.opacity) : this.opacity;
ctx.arc(noTransform ? this.left : 0, noTransform ? this.top : 0, this.radius, 0, piBy2, false);
ctx.closePath();
if (this.fill) {

View file

@ -89,7 +89,7 @@
_render: function(ctx, noTransform) {
ctx.beginPath();
ctx.save();
ctx.globalAlpha *= this.opacity;
ctx.globalAlpha = this.group ? (ctx.globalAlpha * this.opacity) : this.opacity;
if (this.transformMatrix && this.group) {
ctx.translate(this.cx, this.cy);
}

View file

@ -87,7 +87,7 @@
h = this.height;
ctx.beginPath();
ctx.globalAlpha *= this.opacity;
ctx.globalAlpha = this.group ? (ctx.globalAlpha * this.opacity) : this.opacity;
if (this.transformMatrix && this.group) {
ctx.translate(