dojo.gfx matrix transformation

Posted by Linus on Stack Overflow See other posts from Stack Overflow or by Linus
Published on 2010-01-10T20:32:30Z Indexed on 2010/03/27 16:03 UTC
Read the original article Hit count: 252

Filed under:
|
|
|

Matrix transformations has got my head spinning. I've got a dojox.gfx.group which I want to be draggable with Mover and then be able to rotate it around a certain point on the surface. My basic code looks like this:

this.m = dojox.gfx.matrix,
.
.
.

updateMatrix: function(){
  var mtx = this.group._getRealMatrix();
  var trans_m = this.m.translate(mtx.dx, mtx.dy);
  this.group.setTransform([this.m.rotateAt(this.rotation, 0, 0), trans_m]); 
}

The rotation point is at (0,0) just to keep things simple. I don't seem to understand how the group is being rotated.

Any reference to simplistic tutorial on matrix transformations would also help. The ones I've checked out haven't help too much.

© Stack Overflow or respective owner

Related posts about dojo

Related posts about dojox