Rahul Gurung

Rahul Gurung

490 Articles Published

Articles by Rahul Gurung

Page 19 of 49

How to set the minimum allowed scale value of Textbox using FabricJS?

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

In this tutorial, we are going to learn how to set the minimum allowed scale of Textbox using FabricJS. We can customize, stretch or move around the text written in a textbox. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. Similarly, we can also set its minimum allowed scale by using the minScaleLimit property. Syntax new fabric.Textbox(text: String, { minScaleLimit : Number }: Object) Parameters text − This parameter accepts a String which is the ...

Read More

How to create a canvas with IText using FabricJS?

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

In this tutorial, we are going to learn about how to create a canvas with an IText object using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for ...

Read More

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

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 484 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

How to set the opacity of an Ellipse using FabricJS?

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

In this tutorial, we are going to learn how to set the opacity of Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we will have to create an instance of fabric.Ellipse class and add it to the canvas. We can customize an ellipse object by adding a fill color to it, eliminate its borders or even make changes in its dimensions. Similarly, we can also change its opacity by using the opacity property. Syntax new fabric.Ellipse({ opacity: Number }: Object) Parameters ...

Read More

How to set the opacity of Textbox using FabricJS?

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

In this tutorial, we are going to learn how to set the opacity of Textbox using FabricJS. Textbox is one of the various shapes provided by FabricJS. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. We can customize a textbox object by adding a fill colour to it, eliminate its borders or even make changes in its dimensions. Similarly, we can also change its opacity by using the opacity property. Syntax new fabric.Textbox(text: String, { opacity: Number }: Object) Parameters ...

Read More

How to create text path in IText using FabricJS?

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

In this tutorial, we are going to learn about how to create text path in IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText as ...

Read More

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

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 442 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

How to set the padding of an Ellipse using FabricJS?

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

In this tutorial, we are going to learn how to set the padding of an Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we will have to create an instance of fabric.Ellipse class and add it to the canvas. Just as we can specify the position, color, opacity and dimension of an ellipse object in the canvas, we can also set the padding of an ellipse object. This can be done by using the padding property. Syntax new fabric.Ellipse({ padding : Number }: Object) ...

Read More

How to set the padding of Textbox using FabricJS?

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

In this tutorial, we are going to learn how to set the padding of a Textbox using FabricJS. Textbox is one of the various shapes provided by FabricJS. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also set the padding of a textbox object. This can be done by using the padding property. Syntax new fabric.Textbox(text: String, { padding : Number }: Object) ...

Read More

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

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 953 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
Showing 181–190 of 490 articles
« Prev 1 17 18 19 20 21 49 Next »
Advertisements