mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-20 19:31:52 +00:00
Fix opacity of rect, circle, ellipse objects. Fix #289.
This commit is contained in:
parent
39efd11c4c
commit
1744469063
3 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue