Rahul Gurung

Rahul Gurung

490 Articles Published

Articles by Rahul Gurung

Page 45 of 49

How to set the size of the controlling corners of Text using FabricJS?

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

In this tutorial, we are going to learn how to set the size of the controlling corners of Text using FabricJS. The controlling corners of an object allow us to scale, stretch or change its position. We can customize our controlling corners in many ways such as adding a specific colour to it, changing its size etc. We can change the size by using the cornerSize property. Syntax new fabric.Text(text: String, { cornerSize: Number }: Object) Parameters text − This parameter accepts a String which is the text string that ...

Read More

How to set the angle of rotation of a Line using FabricJS?

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

In this tutorial, we are going to learn about how to set the angle of rotation of a Line using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. The centeredRotation property allows us to use the center point of a line object as the ...

Read More

How to lock the horizontal scaling of a Rectangle using FabricJS?

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

In this tutorial, we are going to learn how to lock the horizontal scaling of a Rectangle using FabricJS. Just as we can specify the position, colour, opacity and dimension of a rectangle object in the canvas, we can also specify whether we want to stop scaling an object horizontally. This can be done by using the lockScalingX property. Syntax new fabric.Rect({ lockScalingX : Boolean }) Parameters Options (optional) − This parameter is an Object which provides additional customizations to our rectangle. Using ...

Read More

How to set the style of controlling corners of Text using FabricJS?

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

In this tutorial, we are going to learn how to set the style of controlling corners of Text using FabricJS. The controlling corners of an object allow us to scale, stretch or change its position. We can customize our controlling corners in many ways such as adding a specific colour to it, changing its size etc. We can change the style by using the cornerStyle property. Syntax new fabric.Text(text: String, { cornerStyle: String }: Object) Parameters text − This parameter accepts a String which is the text string that we ...

Read More

How to lock the horizontal skewing of Rectangle using FabricJS?

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

In this tutorial, we are going to learn how to lock the horizontal skewing of a Rectangle using FabricJS. Just as we can specify the position, colour, opacity and dimension of a rectangle object in the canvas, we can also specify whether we want to stop skewing an object horizontally. This can be done by using the lockSkewingX property. Syntax new fabric.Rect({ lockSkewingX : Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional customizations to our rectangle. Using this parameter, properties such as colour, ...

Read More

How to set the style of individual characters in Text using FabricJS?

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

In this tutorial, we are going to learn how to set the style of individual characters in Text using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. Similarly, we can also set the style of individual characters by using the styles property. Syntax new fabric.Text(text: String , { styles: Object }: ...

Read More

How to set the background colour of Line in FabricJS?

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

In this tutorial, we are going to learn how to set the background colour of Line using FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. The backgroundColor property allows us to assign a colour to our object's background. Syntax new fabric.Line( points: ...

Read More

How to lock the rotation of Rectangle using FabricJS?

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

In this tutorial, we are going to learn how to lock the rotation of a Rectangle using FabricJS. Just as we can specify the position, colour, opacity and dimension of a rectangle object in the canvas, we can also specify whether we want it to rotate or not. This can be done by using the lockRotation property. Syntax new fabric.Rect({ lockRotation : Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional customizations to our ...

Read More

How to set the text alignment of Text using FabricJS?

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

In this tutorial, we are going to learn how to set the text alignment of text in Text using FabricJS. We can display text on canvas by adding an instance of fabric.Text. Not only does it allow us to move, scale and change the dimensions of the text but it also provides additional functionality like text alignment, text decoration, line height which can be obtained by the properties textAlign, underline and lineHeight respectively. Similarly, we can also set its text alignment by using the textAlign property. Syntax new fabric.Text(text: String , { textAlign : String }: Object) ...

Read More

How to set the border colour of a Line in FabricJS?

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

In this tutorial, we are going to learn about how to set the border colour of Line in FabricJS. A Line element is one of the basic elements provided in FabricJS. It is used for creating straight lines. Because line elements are geometrically one-dimensional and do not contain an interior, they are never filled. We can create a line object by creating an instance of fabric.Line, specifying the x and y coordinates of the line and adding it to the canvas. The property borderColor allows us to manipulate the colour of the border when our object is active. ...

Read More
Showing 441–450 of 490 articles
« Prev 1 43 44 45 46 47 49 Next »
Advertisements