javascript - Set an image to fill the canvas using Paper.js -


i have image has same aspect ratio canvas different resolution. know can make use of view size, view.viewsize, trouble setting dimensions of image. have tried setting width using raster.width = 2000;, example, not seem work.

use raster.bounds instead

(for width)

raster.bounds.width = 2000; 

or

(for height)

raster.bounds.height = 2000; 

so, right, should able canvas size with:

paper.view.viewsize 

and assign raster proper with/height


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Java JSoup error fetching URL -

webstorm - PhpStorm file cache conflict with TypeScript compiler -