I have an Image() object, which I need to resize. I am using it to fill a shape in canvas.
If I try to change it like image.width = 300, it doesn’t resize. If I console.log it, it shows that only the html attribute has been changed.
Is there a way to edit the Image() size directly?
You can do this using the setting the
fill.scaleobject with the propertiesfill.scale.xandfill.scale.ythat you wish to apply to your image.In the example, this could be done, for example like:
You can see an example of this working here