Closed
Bug 1101787
Opened 11 years ago
Closed 11 years ago
canvas context .isPointInPath returns incorrect results with large scale
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: david+bugs, Unassigned)
Details
Attachments
(1 file)
|
1.58 KB,
text/html
|
Details |
The canvas .isPointInPath method can return incorrect results when the canvas has a large scale: it seems that a large scale quantizes the result returned to the scale in question (my guess, without looking at the source, is that this function is implemented by filling the path on a raster with the identity transformation matrix and checking whether the transformed point has been painted).
The attached file illustrates this: when the scale parameter in the JavaScript is set to a low value, it works correctly, but if it is set to, say, 100 or 1000, the values returned are incorrect (in the case of 1000, it seems that every point is detected outside the path; in the case of 100, points near the edge are often incorrectly detected as being inside it).
If my guess is correct, the fix would be to fill the path on a raster of the size of the actual canvas.
This bug may be a consequence of bug 405300 having been incorrectly fixed.
| Reporter | ||
Comment 1•11 years ago
|
||
This bug seems to have been fixed in Firefox 35 or before: I am no longer able to reproduce it. Marking as fixed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•