How to rotate Microsoft.Matrix filter to canvas?
Can anyone help with this generic rotate function (this is for jquery, but it's a javascript thing): http://pastebin.com/m382b30e
I changed the non-IE canvas code to rotate around the center of the image (see http://uptowar.com/jquery in firefox). Now I need to change the IE microsoft filter to do the same (see the same URL in Internet Explorer). But how? There is little clear documentation for this filter.
0
source to share
1 answer
Suppose you have nAngle in radians, then the rotating matrix will look like this:
var nCos = Math.cos (nAngle) .toFixed (3), nSin = Math.sin (nAngle) .toFixed (3); var sFilter = "progid: DXImageTransform.Microsoft.Matrix (sizingMethod = 'auto expand', M11 =" + nCos + ", M12 =" + (-nSin) + ", M21 =" + nSin + ", M22 =" + nCos + ")";
You can also look at the spec: Matrix filter
+1
source to share