FabricJS Articles

Page 8 of 51

How to set the angle of an Image using FabricJS?

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

In this tutorial, we are going to learn how to set the angle of an 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 the angle of an Image, we use the angle property. Syntax new fabric.Image( element: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String, { angle: Number }: Object, callback: function) Parameters ...

Read More

FabricJS – How to set the background colour of selection of an Image?

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

In this tutorial, we are going to learn how to set the background colour of selection of 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 the background colour of Image, we use the selectionBackgroundColor property. Syntax new fabric.Image( element: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String, { selectionBackgroundColor: String }: Object, callback: function) Parameters ...

Read More

How to set the border colour of Image in FabricJS?

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

In this tutorial, we are going to learn how to set the border colour of Image 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 set the border colour of Image, we use the borderColor property. Syntax new fabric.Image( element: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String, { borderColor: String }: Object, callback: function) Parameters ...

Read More

How to set the opacity of Image using FabricJS?

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

In this tutorial, we are going to learn how to set the opacity of 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 the opacity of Image, we use the opacity property. Syntax new fabric.Image( element: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String, { opacity: Number }: Object, callback: function) Parameters element − This parameter accepts HTMLImageElement, ...

Read More

How to set the padding of Image using FabricJS?

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

In this tutorial, we are going to learn how to set the padding of 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 the padding of Image, we use the padding property. Syntax new fabric.Image( element: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String, { padding: Number }: Object, callback: function) Parameters ...

Read More

How to set the position of Image from left using FabricJS?

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

In this tutorial, we are going to learn how to set the position of Image from left 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 the position of Image from left, we use the left property. Syntax new fabric.Image( element: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | String, { left: Number }: Object, callback: function) Parameters ...

Read More

How to straighten an Image with animation using FabricJS?

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

In this tutorial, we are going to learn how to straighten an Image with animation 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 straighten an Image with animation, we use the fxStraighten method. Syntax fxStraighten(callbacks: Object): fabric.Object Parameters callbacks − This parameter is an Object with callback functions which can be used to change certain properties related to ...

Read More

Adding a pattern with image and colour to a Polygon using FabricJS

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

We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. 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 add pattern with image and colour to a Polygon, we can use the Pattern class in FabricJS. Syntax new fabric.Pattern( options: Object, callback: function ) Parameters ...

Read More

Adding fade-in and fade-out animation to a Polygon object using FabricJS

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

We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. 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 add fade-in and fade-out animation, we can use the opacity property in conjunction with animate method. Syntax animate(property: String | Object, value: Number | Object): fabric.Object | fabric.AnimationContext | Array. Parameters property ...

Read More

Adding rotation animation to a Polygon object using FabricJS

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

We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. 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 add rotation animation, we can use the angle property in conjunction with animate method. Syntax animate(property: String | Object, value: Number | Object): fabric.Object | fabric.AnimationContext | Array. Parameters ...

Read More
Showing 71–80 of 506 articles
« Prev 1 6 7 8 9 10 51 Next »
Advertisements