I wanted to keep segments in a path managed by my own coordinate system and set the paperjs transformation directly based on a view change. -- the path itself does not change, but the view changes.
I used the following code snippet.
var path = new paper.Path();
path.applyMatrix = false;
// :
// :
// : calculating transform m based on view change
// : m = [a, b, c, d, tx, ty]
path.matrix.set(m[0], m[1], m[2], m[3], m[4], m[5]);
while the path gets draw properly with respect to the coordinates, the stroke width changes instead of staying constant. That is, when I zoom in, the stroke becomes thicker, and when I zoom out the stroke becomes thinner. I would like it to stay constant, is there a suggested way to do this instead of changing the stroke width to compensate it?
Thank you!