Question

I have a necessity of translating coordinate system of the canvas in paperjs so that topleft of the canvas something other than (0,0) depending on the circumstances.By changing the coordinates I want the whole view rendered to be translated. Is it possible to do that in paperjs?

Was it helpful?

Solution

Do you want to do your own drawing using the canvas API or do you want to transform the coordinate space for paperjs? The first case can be handled by surrounding your transformation and drawing using context.save() and restore(). The latter can be handled by the transformation API in layer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top