RESOLVED FIXED17169
Support transform on Canvas
https://bugs.webkit.org/show_bug.cgi?id=17169
Summary Support transform on Canvas
Oliver Hunt
Reported 2008-02-03 17:13:04 PST
Add transform() support to Canvas
Attachments
Patch to support transform (13.47 KB, patch)
2008-02-03 18:01 PST, Oliver Hunt
mjs: review+
Oliver Hunt
Comment 1 2008-02-03 18:01:06 PST
Created attachment 18893 [details] Patch to support transform
Darin Adler
Comment 2 2008-02-03 18:14:35 PST
Comment on attachment 18893 [details] Patch to support transform + state().m_path.transform(transform.inverse()); Is the transform guaranteed to be invertible? If not, what happens? Does a test case cover this?
Maciej Stachowiak
Comment 3 2008-02-03 18:19:35 PST
Comment on attachment 18893 [details] Patch to support transform Looks good, assuming isfinite checks for NaN as well as infinities (I am not sure if it does). r=me but please double-check that detail.
Oliver Hunt
Comment 4 2008-02-03 18:38:12 PST
Landed r29956 -- added an additional nan testcase
Darin Adler
Comment 5 2008-02-03 19:05:57 PST
(In reply to comment #3) > Looks good, assuming isfinite checks for NaN as well as infinities (I am not > sure if it does). Yes, isfinite(x) === !isnan(x) && !isinf(x).
Darin Adler
Comment 6 2008-02-03 19:06:13 PST
(In reply to comment #2) > (From update of attachment 18893 [details] [edit]) > + state().m_path.transform(transform.inverse()); > > Is the transform guaranteed to be invertible? If not, what happens? Does a test > case cover this? Ollie?
Oliver Hunt
Comment 7 2008-02-03 19:44:38 PST
Darin, whoops, didn't see your comment. It's safe -- it's equivalent to scale(0,0) for example. That said it should have a testcase which i'll work on after i eat
Note You need to log in before you can comment on or make changes to this bug.