Open
Bug 967142
Opened 11 years ago
Updated 3 years ago
drawImage and clearRect don't affect the same pixels while scale transform exists
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
NEW
People
(Reporter: starwed, Unassigned)
References
()
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140131030203
Steps to reproduce:
- Scale the canvas
- draw an image
- clip to a sub rectangle,
- clear that rectangle
- draw the image again.
Actual results:
A line of pixels around the border remains the background color.
Here is a jsfiddle that reproduces the issue: http://jsfiddle.net/VAXrL/1059/
It is somewhat hard to spot in a static image, but there is a clear line of lime green pixels on the TV sprite.
Expected results:
drawImage should draw to every pixel that was cleared. (This seems to be what Chrome does.)
This is causing a problem in the canvas drawing routine we use in CraftyJS; when a transformation is applied to the canvas, lines of the background color will sometimes appear due to this interaction of clearRect and drawImage.
| Reporter | ||
Updated•11 years ago
|
Updated•11 years ago
|
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
Comment 1•11 years ago
|
||
(In reply to Tim Martin from comment #0)
> there is a clear line of lime green pixels on the TV sprite.
Confirmed in FF 29.0a1 (2014-02-03), win 7 x64
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 2•10 years ago
|
||
Just confirming that I still observe this bug with recent a recent nightly build: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•