Rahul Gurung

Rahul Gurung

490 Articles Published

Articles by Rahul Gurung

Page 9 of 49

How to create a canvas with Circle using FabricJS?

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

In this tutorial, we are going to learn about how to create a canvas with a Circle object using FabricJS. Circle is one of the various shapes provided by FabricJS. In order to create a circle, we will have to create an instance of fabric.Circle class and add it to the canvas. Syntax new fabric.Circle({ radius: Number }: Object) Parameters options (optional) − This parameter is an Object which provides additional customizations to our object. Using this parameter, properties such as colour, cursor, ...

Read More

How to create a Circle with a background colour using FabricJS?

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

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

Read More

How to create a Circle with border colour using FabricJS?

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

In this tutorial, we are going to create a Circle with border colour using FabricJS. Circle is one of the various shapes provided by FabricJS. In order to create a circle, we will create an instance of fabric.Circle class and add it to the canvas. Since FabricJS is extremely flexible, we are allowed to customize our circle object in any way we like. One of the properties that FabricJS provides is borderColor which allows us to manipulate the colour of the border when our object is active. Syntax new fabric.Circle({ borderColor: String }: Object) Parameters ...

Read More

How to crop the width in a cloned image using FabricJS?

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

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

Read More

How to create a Circle with crosshair cursor on hover over objects using FabricJS?

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

In this tutorial, we are going to create a Circle with a crosshair cursor on hover over objects using FabricJS. crosshair is one of the native cursor styles available which can be used in the FabricJS canvas too. FabricJS provides various types of cursors like default, all-scroll, crosshair, col-resize, row-resize etc which are reusing the native cursor underhood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Circle({ hoverCursor: String }: Object) Parameters options (optional) ...

Read More

How to create a Circle with dash pattern border using FabricJS?

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

In this tutorial, we are going to create a circle with a dash pattern border using FabricJS. Circle is one of the various shapes provided by FabricJS. In order to create a circle, we will create an instance of fabric.Circle class and add it to the canvas. We can change the appearance of the dashes of border, by using the borderDashArray property. However, our circle object must have borders in order for this property to work. If the hasBorders property is assigned a false value, this property will not work. Syntax new fabric.Circle({ borderDashArray: Array }: Object) ...

Read More

How to create a Circle with help cursor on hover over objects using FabricJS?

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

In this tutorial, we will learn how to create a Circle with a help cursor on hover using FabricJS. The help cursor is one of the native cursor styles available which can be used in FabricJS canvas. FabricJS provides various cursor types like default, all-scroll, crosshair, col-resize, and row-resize, all reusing native cursor styles. The hoverCursor property controls the cursor style when hovering over a canvas object. Syntax new fabric.Circle({ hoverCursor: String }: Object) Parameters options (optional) − An Object providing additional customizations ...

Read More

How to create a Circle with not-allowed cursor on hover over objects using FabricJS?

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

In this tutorial, we are going to create a Circle with a not-allowed cursor on hover over objects using FabricJS. not-allowed is one of the native cursor styles available which can be used in the FabricJS canvas too. FabricJS provides various types of cursors like default, all-scroll, crosshair, col-resize, row-resize etc. which are reusing the native cursor underhood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Circle({ hoverCursor: String }: Object) Parameters options (optional) − This parameter is an Object which ...

Read More

How to add line height to multiline text in IText using FabricJS?

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

In this tutorial, we are going to learn about how to add line height to multiline text in 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 ...

Read More

How to disable multiple specific control points of Image object using FabricJS?

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

In this tutorial, we are going to learn how to disable multiple specific control points of an Image object 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 disable multiple specific control points of an Image object, we use the setControlsVisibility method. Syntax setControlsVisibility(options: Object): fabric.Object Parameters options − This parameter accepts ...

Read More
Showing 81–90 of 490 articles
« Prev 1 7 8 9 10 11 49 Next »
Advertisements