I am new to Snap.svg and I am trying to skew a simple rectangle, but I can't figure out how. I already searched in the docs.
This is what I have so far:
/* stage */
var s = Snap('#mysvg');
s.clientRect = s.node.getBoundingClientRect();
s.width = s.clientRect.width;
s.height = s.clientRect.height;
s.center = {
"left" : s.width/2,
"top" : s.height/2,
};
/* rectangle */
var rect = {};
rect.width = 120;
rect.height = 230;
rect.borderRadius = 10;
rect = s.rect(s.center.left, s.center.top,rect.width,rect.height, rect.borderRadius);
rect.transformMatrix = new Snap.Matrix();
rect.transformMatrix.scale(1,0.86062);
rect.transformMatrix.rotate(30);
// rect.transformMatrix.skew(30);
rect.transform(rect.transformMatrix);
It seems like skewing is not supported within the transform Matrix..
any ideas?