Closed Bug 353981 Opened 16 years ago Closed 15 years ago

Problems with globalAlpha being ignored sometimes

Categories

(Core :: Graphics: Canvas2D, defect, P3)

PowerPC
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: hello, Assigned: philip)

Details

(Keywords: testcase)

Attachments

(2 files)

This code breaks:

var x1 = Math.round((this.endTime - xoffs) * xscale);
beginPath();
moveTo(x0-0.5, v+0.5);
lineTo(x1+0.5, v+0.5);
strokeStyle = colorToRgbString(this.dataSets[i].color);
globalAlpha = 0.2;
lineWidth = 5.0;
stroke();
globalAlpha = 1.0;
lineWidth = 1.0;
stroke();

But doing a save and restore instead works.
Attached file test case
Added clearer test case. Confirmed in current trunk build on Windows.
Flags: blocking1.9?
Attached patch patchSplinter Review
Thanks for the patch!  Though, could you set a review request on me when you file patches?  Otherwise I often miss them.
Flags: wanted1.9+
Flags: blocking1.9?
Flags: blocking1.9-
Target Milestone: --- → mozilla1.9 M10
Assignee: vladimir → philip
Is this a regression in 1.9?
Checking in content/canvas/src/nsCanvasRenderingContext2D.cpp;
/cvsroot/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp,v  <--  nsCanvasRenderingContext2D.cpp
new revision: 1.107; previous revision: 1.106
done
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.