How to add image to polygon in fabric js?
问题 1I am creating a polygon with definite points,when i try to add an image to the polygon object.Image is not rendering in the polygon.it is rendering from starting point of the canvas. Below is the code i used.Please tell me where i am doing wrong. Appreciate any help!Thanks Jsfiddle Link https://jsfiddle.net/u3bfscom/6/ Add Points and create polygon later add Texture. fabric.Image.fromURL('https://image.freepik.com/free-photo/roof-texture_21206171.jpg', function (oImg) { for(var i=0;canvas