javascript - How to set background image from current canvas in fabric js -
im looking how set background image current canvas in fabric js
is possible do? or please explain me know how it.
i 1) 2) 5) though, couldnt figure out want number 3
1) import png image pc
2) such rotate, expand image
3) set background image it
4) again
5) export png image
i tried this
var object2 = new fabric.circle({ left: 200, top: 200, radius: 30, fill: 'gray', stroke: 'black', strokewidth: 3 }); canvas.setbackgroundimage(object2, canvas.renderall.bind(canvas)); canvas.renderall();
it works though next 1 doesnt work after upload image.
var object = canvas.getactiveobject(); canvas.setbackgroundimage(object, canvas.renderall.bind(canvas)); canvas.renderall();
i referred upload code here
how upload image canvas fabric.js?
thanks in advance.
canvas.setbackgroundimage(obj)
use set uploaded image canvas background. more check
Comments
Post a Comment