I have an image that has the same aspect ratio as the canvas but a different resolution. I know I can make use of the view size, view.viewSize
, but my trouble is setting the dimensions of the image. I have tried setting the width using raster.width = 2000;
, for example, but it does not seem to work.
This ended up working for me.
raster.size = paper.view.viewSize;
raster.position = paper.view.center;