Set Border Scale Factor of Textbox Using FabricJS

Rahul Gurung
Updated on 03-Aug-2022 07:33:25

347 Views

In this article, we are going to set the border scale factor of 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. We can use the borderScaleFactor property which specifies the scale factor of the object's controlling borders. Syntax new fabric.Textbox(text: String, { borderOpacityWhenMoving: Number }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options ... Read More

Find the Area of a Parallelogram in Swift

Ankita Saini
Updated on 02-Aug-2022 14:55:14

653 Views

This tutorial will discuss how to write a swift program to find the area of a parallelogram.A Parallelogram is a quadrilateral that is created using parallel lines.Where the opposite sides are parallel and equal and the opposite angles of the parallelograms are equal. It is of three types - rectangle, square, and rhombus.In a parallelogram, an area is known as the space that is enclosed inside the boundaries or sides of the parallelogram in the two-dimensional plane. Suppose we have a tea try now the area of the parallelogram helps us to find how much paint we required to cover ... Read More

Find the Area of a Trapezium in Swift

Ankita Saini
Updated on 02-Aug-2022 14:52:10

280 Views

This tutorial will discuss how to write a swift program to find the area of a trapezium.A trapezium is a quadrilateral with at least a pair of opposite parallel sides. The parallel sides are known as the base and the non-parallel sides are known as the legs of the trapezium. The distance between the parallel sides is known as the height of the trapezium.In a trapezium, an area is known as the space that is enclosed inside the boundaries of the trapezium in the two-dimensional plane. Suppose we have a board, now the area of the trapezium helps us to ... Read More

Find the Perimeter of a Rectangle in Swift

Ankita Saini
Updated on 02-Aug-2022 14:50:01

552 Views

This tutorial will discuss how to write a swift program to find the perimeter of a Rectangle.A rectangle is a 2-dimensional closed shape with four sides in which opposite sides are parallel and equal to each other. It also has four angle with 90 degrees each.The perimeter of the rectangle is used to calculate the boundary of the rectangle. Or we can say that it is the total distance covered by the rectangle’s outer boundary as show in the above diagram. It is the one of the most important formula of the rectangle. Suppose we want to fence our rectangular ... Read More

Calculate Simple Interest and Compound Interest in Swift

Ankita Saini
Updated on 02-Aug-2022 14:43:45

658 Views

This tutorial will discuss how to write a swift program to calculate the simple interest and compound interest. Compound Interest The interest applied on the principal and interest together over a certain period of time is known as the compound interest. Or in other words compound interest is known as the interest on interest. It is calculated after calculating amount. Formula Following is the formula of compound interest − Amount(A) = Principal(P)(1 + Rate/100)Time(t)C.I = Amount(A) - Principal(P) Where Principal(P) − Principal amount represents the amount which is initially invested. Rate(R) − Rate represents the interest rate which applied ... Read More

Set Width of Textbox Using Fabric.js

Rahul Gurung
Updated on 02-Aug-2022 14:26:35

888 Views

In this tutorial, we are going to learn how to set the width 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. However, one of the fundamental properties of textbox is width which specifies the horizontal width of the textbox. Syntax new fabric.Textbox(text: String, { width: Number }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display ... Read More

Set Vertical Scale Factor of Textbox Using Fabric.js

Rahul Gurung
Updated on 02-Aug-2022 14:22:06

247 Views

In this tutorial, we are going to learn how to set the vertical scale factor 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. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also set the vertical scale factor of a textbox object. This can be done by using the scaleY property. Syntax new fabric.Textbox(text: String, { scaleY ... Read More

Style Corners of Textbox Using Fabric.js

Rahul Gurung
Updated on 02-Aug-2022 14:19:52

365 Views

In this tutorial, we are going to learn how to set the style of controlling corners of 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 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 ... Read More

Set Size of Controlling Corners of Textbox in Fabric.js

Rahul Gurung
Updated on 02-Aug-2022 14:15:19

197 Views

In this tutorial, we are going to learn how to set the size of the controlling corners of a Textbox 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.Textbox(text: String, { cornerSize: Number }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. ... Read More

Set Position of Textbox from Top Using Fabric.js

Rahul Gurung
Updated on 02-Aug-2022 14:11:40

572 Views

In this tutorial, we are going to set the position of Textbox from top using FabricJS. The top property allows us to manipulate the position of the object. 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. By default, the top position is relative to the canvas’s top edge. Syntax new fabric.Textbox(text: String, { top: Number }: Object) Parameters text − This parameter accepts a String which is the text string that ... Read More

Advertisements