99
rated 0 times
[
106]
[
7]
/ answers: 1 / hits: 27594
/ 10 Years ago, tue, april 29, 2014, 12:00:00
I have an image background in my HTML5 canvas.
var canvas = new fabric.Canvas('#canvas1');
canvas.setBackgroundImage(
'http://fabricjs.com/assets/jail_cell_bars.png',
canvas.renderAll.bind(canvas)
);
How to set dimensions of my canvas (width, height) to the dimensions of the background image?
Thanks.
More From » fabricjs