Closed Bug 346943 Opened 14 years ago Closed 14 years ago

Canvas fills when it should stroke

Categories

(Core :: Canvas: 2D, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: andrew, Assigned: vlad)

References

Details

(Keywords: fixed1.8.1, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5
Build Identifier: Trunk (problem appeared sometime in the last week)

Try my testcase.

Reproducible: Always

Steps to Reproduce:
Try my testcase.
Actual Results:  
Get a shaded "triangle".

Expected Results:  
Should only see lines.
I can confirm this on trunk.  Works just fine in 1.5.0.5.
Flags: blocking1.9a2?
I'd guess that's caused by the patch in bug 346421 (now in the 1.8 branch), which adds into Render a zero-sized rectangle and a fill but doesn't do the equivalent of beginPath - so if a path is open at the time Render is called, that path will be filled. And I guess Render can't simply call the equivalent of beginPath because it can't be sure nobody's going to come back to the canvas later and expect it to still have the path they last set up. (Or I could be guessing wrong; but at least it sounds plausible.)
Works in Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b1) Gecko/20060731 BonEcho/2.0b1
Fails in Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1b1) Gecko/20060801 BonEcho/2.0b1

Half of the examples at http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes fail too.
Flags: blocking1.8.1?
Keywords: testcase
Flags: blocking1.8.1? → blocking1.8.1+
(In reply to comment #3)
> I'd guess that's caused by the patch in bug 346421 (now in the 1.8 branch),
> which adds into Render a zero-sized rectangle and a fill but doesn't do the
> equivalent of beginPath - so if a path is open at the time Render is called,
> that path will be filled. And I guess Render can't simply call the equivalent
> of beginPath because it can't be sure nobody's going to come back to the canvas
> later and expect it to still have the path they last set up. (Or I could be
> guessing wrong; but at least it sounds plausible.)

That's what I said on IRC last night; though it's got nothing to do with Render in particular.  I have a fix, but I like it even less than the fix for 346421.  Going to investigate more today.

Assignee: nobody → vladimir
Status: UNCONFIRMED → NEW
Ever confirmed: true
This should be fixed; please reopen if it's not?  (Testcase works for me in bonecho 20060814.)
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Flags: blocking1.9a2?
You need to log in before you can comment on or make changes to this bug.