dojox.gfx.Image._applyTransform
dojo.require("dojox.gfx.vml");
defined in dojox/gfx/vml.js
Usage
function () (view source)
var matrix = this._getRealMatrix(), img = this.rawNode.firstChild, s = img.style, shape = this.shape; if(matrix){ matrix = dojox.gfx.matrix.multiply(matrix, {dx: shape.x, dy: shape.y}); }else{ matrix = dojox.gfx.matrix.normalize({dx: shape.x, dy: shape.y}); } if(matrix.xy == 0 && matrix.yx == 0 && matrix.xx > 0 && matrix.yy > 0){ // special case to avoid filters this.rawNode.style.filter = ""; s.left = Math.floor(matrix.dx) + "px"; s.top = Math.floor(matrix.dy) + "px"; this._setDimensions(s, Math.floor(matrix.xx * shape.width), Math.floor(matrix.yy * shape.height)); }else{ this._resetImage(); var f = this.rawNode.filters["DXImageTransform.Microsoft.Matrix"]; if(f){ f.M11 = matrix.xx; f.M12 = matrix.xy; f.M21 = matrix.yx; f.M22 = matrix.yy; f.Dx = matrix.dx; f.Dy = matrix.dy; }else{ this.rawNode.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11=" + matrix.xx + ", M12=" + matrix.xy + ", M21=" + matrix.yx + ", M22=" + matrix.yy + ", Dx=" + matrix.dx + ", Dy=" + matrix.dy + ")"; } } return this;