FabricJS Articles

Page 7 of 51

FabricJS – How to get the position of Image object with respect to origin?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 2K+ Views

In this tutorial, we are going to learn how to get the position of Image object with respect to origin using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to get the position of Image object with respect to origin, we use the getPointByOrigin method. Syntax getPointByOrigin(originX: String, originY: String): fabric.Point Parameters originX − This parameter accepts a String ...

Read More

How to identify the type of an Image instance using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 356 Views

In this tutorial, we are going to learn how to identify the type of an Image instance in FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to identify the type of an Image instance, we use the isType method. Syntax isType(type: String): Boolean Parameters type − This parameter accepts a String which specifies the type we want to check. ...

Read More

FabricJS – How to remove the current object shadow in a cloned image?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 532 Views

In this tutorial, we are going to learn how to remove the current object shadow in a cloned image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to remove the current object shadow in a cloned image, we use the withoutShadow property. Syntax cloneAsImage( callback: function, { withoutShadow: Boolean }: Object): fabric.Object Parameters callback (optional) − This parameter ...

Read More

FabricJS – How to remove the current object transform in a cloned image?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 493 Views

In this tutorial, we are going to learn how to remove the current object transform (scale, angle, flip and skew) in a cloned image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to remove the current object transform in a cloned image, we use the withoutTransform property. Syntax cloneAsImage(callback: function, { withoutTransform: Boolean }: Object): fabric.Object Parameters callback (optional) − This parameter ...

Read More

FabricJS – How to scale an image equally on horizontal and vertical directions?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 456 Views

In this tutorial, we are going to learn how to scale an image equally on horizontal and vertical directions using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to scale an image equally on horizontal and vertical directions, we use the scale method. Syntax scale(value: Number): fabric.Object Parameters value − This parameter accepts a Number which sets the scale factor ...

Read More

FabricJS – How to scale an Image object to a given height?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 957 Views

In this tutorial, we are going to learn how to scale an Image object to a given height using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to scale an Image object to a given height, we use the scaleToHeight method. Syntax scaleToHeight(value: Number, absolute: Boolean): fabric.Object Parameters value − This parameter accepts a Number which determines ...

Read More

FabricJS – How to scale an Image object to a given width?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 4K+ Views

In this tutorial, we are going to learn how to scale an Image object to a given width using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to scale an Image object to a given width, we use the scaleToWidth method. Syntax scaleToWidth(value: Number, absolute: Boolean): fabric.Object Parameters value − This parameter accepts a Number which determines ...

Read More

How to set a multiplier to scale a cloned image using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 441 Views

In this tutorial, we are going to learn how to set a multiplier to scale the cloned image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to set a multiplier to scale the cloned image, we use the multiplier property. Syntax cloneAsImage( callback: function, { multiplier: Number}: Object): fabric.Object Parameters callback (optional) − This parameter is a function which ...

Read More

FabricJS – How to get the image element on which the current instance is based on?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 854 Views

In this tutorial, we are going to learn how to get the image element on which the current instance is based on using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to get the image element on which the current instance is based on, we use the getElement method. Syntax getElement(): HTMLImageElement Using the getElement Method In this example, we have used the getElement ...

Read More

How to set Image objects properties from options using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 888 Views

In this tutorial, we are going to learn how to set Image objects properties from options using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to set Image objects properties from options, we use the setOptions method. Syntax setOptions(options: Object) Parameters options (optional) − This parameter is an Object which provides additional customizations to our object. Using this parameter ...

Read More
Showing 61–70 of 506 articles
« Prev 1 5 6 7 8 9 51 Next »
Advertisements