RESOLVED FIXED 30402
[CHROMIUM] Chromium/skia's canvas isPointInPath() implementation is incorrect
https://bugs.webkit.org/show_bug.cgi?id=30402
Summary [CHROMIUM] Chromium/skia's canvas isPointInPath() implementation is incorrect
Stephen White
Reported 2009-10-15 12:39:10 PDT
See http//crbug.com/7465: "Canvas exposes the method isPointInPath. According to the spec, "Points on the path itself are considered to be inside the path." So that if you create a rect of size 20x20 at 0,0, then the point 0,20 should be in the path. We currently return false, because Skia considers the point 0,20 outside the bounds of the rect. Here's a trivial test case: ctx = document.getElementById("canvas").getContext("2d"); ctx.save(); ctx.beginPath(); ctx.rect(0, 0, 20, 20); ctx.isPointInPath(0, 20); ctx.restore(); See LayoutTests/fast/canvas/pointInPath.html for examples similar to this."
Attachments
Fix for pointInPath() issue. (1.96 KB, patch)
2009-10-15 12:55 PDT, Stephen White
levin: review+
Stephen White
Comment 1 2009-10-15 12:55:21 PDT
Created attachment 41239 [details] Fix for pointInPath() issue.
Stephen White
Comment 2 2009-10-16 07:00:07 PDT
Note You need to log in before you can comment on or make changes to this bug.