Rahul Gurung

Rahul Gurung

490 Articles Published

Articles by Rahul Gurung

Page 4 of 49

How to crop the top offset in a cloned image using FabricJS?

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

In this tutorial, we are going to learn how to crop the top offset 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 crop the top offset in a cloned image, we use the top property. Syntax cloneAsImage( callback: function, { top: Number}: Object): fabric.Object Parameters callback (optional) − This parameter is a function which ...

Read More

How to add dashed stroke to an Ellipse using FabricJS?

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

In this tutorial, we are going to learn how to add a dashed stroke to an Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we will create an instance of fabric.Ellipse class and add it to the canvas. The strokeDashArray property allows us to specify a dash pattern for the object's stroke. Syntax new fabric.Ellipse({ strokeDashArray: Array }: Object) Parameters options (optional) − This parameter is an Object which provides additional customizations ...

Read More

How to add dashed stroke to a Textbox using FabricJS?

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

In this tutorial, we are going to learn how to add a dashed stroke to a 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. The strokeDashArray property allows us to specify a dash pattern for the object's stroke. Syntax new fabric.Textbox(text: String, { strokeDashArray: Array }: Object) Parameters text − This parameter accepts ...

Read More

How to add shadow to an Ellipse using FabricJS?

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

In this tutorial, we are going to learn how to add a shadow to an Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we will create an instance of fabric.Ellipse class and add it to the canvas. Our ellipse object can be customized in various ways like changing its dimensions, adding a background color or even adding a shadow to it. We can add a shadow to an Ellipse by using the shadow property. Syntax new fabric.Ellipse({ shadow : fabric.Shadow }: Object) Parameters ...

Read More

How to add stroke to an Ellipse using FabricJS?

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

In this tutorial, we are going to learn how to add stroke to an Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we have to create an instance of fabric.Ellipse class and add it to the canvas. Our ellipse object can be customized in various ways like changing its dimensions, adding a background color or by changing the color of the line drawn around the object. We can do this by using the stroke property. Syntax new fabric.Ellipse({ stroke: String }: Object) Parameters ...

Read More

How to add stroke to a Textbox using FabricJS?

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

In this tutorial, we are going to learn how to add stroke to a 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. Our textbox object can be customized in various ways like changing its dimensions, adding a background colour, or by changing the colour of the line drawn around the object. We can do this by using the stroke property. Syntax new fabric.Textbox(text: String, { stroke : ...

Read More

How to create a canvas with an ellipse using FabricJS?

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

In this tutorial, we are going to learn how to create a canvas with an Ellipse object using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we will create an instance of fabric.Ellipse class and add it to the canvas. Syntax new fabric.Ellipse({ rx: Number, ry: Number }: Object) Parameters options (optional) − This parameter is an Object which provides additional customizations to our ellipse. Using this parameter color, cursor, stroke width and a ...

Read More

How to change the font size of a Textbox using FabricJS?

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

In this tutorial, we are going to see how to change the font size of a 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. The font size specifies how large or small the characters displayed in our textbox should be. We can change the font size by using the fontSize property. Syntax new fabric.Textbox(text: String, { fontSize: Number }: Object) Parameters ...

Read More

How to create an Ellipse with a background color using FabricJS?

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

In this tutorial, we are going to create an Ellipse with background color using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we have to create an instance of fabric.Ellipse class and add it to the canvas. The backgroundColor property allows us to assign a color to our object's background. It is the color of the container where the ellipse lives and is rectangular in shape for ellipse. Syntax new fabric.Ellipse({ backgroundColor: String }: Object) Parameters ...

Read More

How to change the font style of a Textbox using FabricJS?

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

In this tutorial, we are going to see how to change the font style of a 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. Font style refers to the style of characters typed within a textbox. Syntax new fabric.Textbox(text: String, { fontStyle: String }: Object) Parameters text − This parameter accepts a String ...

Read More
Showing 31–40 of 490 articles
« Prev 1 2 3 4 5 6 49 Next »
Advertisements