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

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -