Articles on Trending Technologies

Technical articles with clear explanations and examples

How to remove elements from an array until the passed function returns true in JavaScript?

Imran Alam
Imran Alam
Updated on 01-Jul-2022 489 Views

In JavaScript, there are various ways to remove elements from an array until the passed function returns true. In this tutorial, we are going to look at 3 methods in detail.Using Array.prototype.filter()The Array.prototype.filter() method can be used to remove elements from an array until the passed function returns true. Please refer to the Array filter() method for more details.Example 1The following code shows how to use this method −    Examples                   var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];       function ...

Read More

How to set the width of stroke of Rectangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 516 Views

In this tutorial, we are going to learn how to set the width of stroke of a Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.The strokeWidth property allows us to specify the width of a stroke for an object.Syntaxnew fabric.Rect( { strokeWidth: Number }: Object)ParametersOptions (optional) − This parameter is an Object which provides additional customizations to our rectangle. Using this parameter, properties such as colour, cursor, stroke width and a lot of ...

Read More

How to set the vertical scale factor of Rectangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 225 Views

In this tutorial, we are going to learn how to set the vertical scale factor of a Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.Just as we can specify the position, colour, opacity and dimension of a rectangle object in the canvas, we can also set the vertical scale of a rectangle object. This can be done by using the scaleY property.Syntaxnew fabric.Rect({ scaleY : Number }: Object)ParametersOptions (optional) − This parameter is ...

Read More

How to set the style of controlling corners of a Rectangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 267 Views

In this tutorial, we are going to learn how to set the style of controlling corners of Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.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.Syntaxnew fabric.Rect({ cornerStyle: String ...

Read More

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

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 354 Views

In this tutorial, we are going to learn how to set the size of the controlling corners of a Rectangle 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.Syntaxnew fabric.Rect({ cornerSize: Number }: Object)ParametersOptions (optional) − This parameter is an Object which provides additional customizations to our rectangle. Using this parameter, properties such as colour, cursor, stroke width, and a lot of ...

Read More

How to set the padding of a Rectangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 660 Views

In this tutorial, we are going to learn how to set the padding of a Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.Just as we can specify the position, colour, opacity and dimension of a rectangle object in the canvas, we can also set the padding of a rectangle object. This can be done by using the padding property.Syntaxnew fabric.Rect({ padding : Number }: Object)ParametersOptions (optional) − This parameter is an Object which ...

Read More

How to set the opacity of a Rectangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 527 Views

In this tutorial, we are going to learn how to set the opacity of Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.We can customize a rectangle 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.Syntaxnew fabric.Rect({ opacity: Number }: Object)ParametersOptions (optional) − This parameter is an Object which provides additional customizations to ...

Read More

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

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 208 Views

In this tutorial, we are going to learn how to set the minimum allowed scale of Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.We can customize a rectangle object by adding a fill colour to it, eliminate its borders or even make changes in its dimensions. Similarly, we can also set its minimum allowed scale by using the minScaleLimit property.Syntaxnew fabric.Rect({ minScaleLimit : Number }: Object)ParametersOptions (optional) − This parameter is an Object ...

Read More

What is the Difference between Liquidity and Profitability?

Probir Banerjee
Probir Banerjee
Updated on 30-Jun-2022 13K+ Views

LiquidityThe liquidity and profitability of a company are directly related to the working capital. When a company maintains high temporary working capital in current assets, it is known to be more liquid. The companies that maintain a lower level of working capital are known as less liquid.Companies that maintain higher liquidity and considered to be at lower risk. They are able to meet the needs of the company and their reservoir of current assets lets them have the freedom to stay solvent.However, more liquid companies have lower profitability because their funds are tied up in operations and these funds cannot ...

Read More

How to set the horizontal scale factor of a Rectangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 30-Jun-2022 328 Views

In this tutorial, we are going to learn how to set the horizontal scale factor of a Rectangle using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas.Just as we can specify the position, colour, opacity and dimension of a rectangle object in the canvas, we can also set the horizontal scale of a rectangle object. This can be done by using the scaleX property.Syntaxnew fabric.Rect({ scaleX : Number }: Object)ParametersOptions (optional) − This parameter is ...

Read More
Showing 32521–32530 of 61,248 articles
Advertisements