Compare and Install Different Python GUI Frameworks

Vikram Chiluka
Updated on 02-Jan-2023 15:41:50

443 Views

Learn about the several Python GUI frameworks, how they operate, and how they compare against one another in this informative article. What is GUI? The abbreviation "GUI" means "Graphical User Interface" Graphical user interfaces (GUIs) are what make it possible for people to interact with computers and other electronic devices. It's essential to software development since it facilitates communication between humans and machines. Basically, it converts textual instructions into more understandable in-game actions. The objective is to provide easy touchpoints for the user to make decisions and use the software. Top Python GUI frameworks The following are some of the ... Read More

Highlight Object on Mouse Hover using Fabric.js

Rahul Gurung
Updated on 02-Jan-2023 15:36:17

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. FabricJS provides us with an extensive set of events with which we can create different effects. Since we want the change to occur when the mouse is hovered, we will use the mouse:move event which is fired when the mouse is moved. Our second requirement ... Read More

Find Translation Matrix of a Polygon Object Using Fabric.js

Rahul Gurung
Updated on 02-Jan-2023 15:32:32

256 Views

A translation slides an object to a fixed distance in a given direction. 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 find the translation matrix, we use the _calcTranslateMatrix() method. This method returns an Array with given values [ 1, 0, 0, 1, A, B]; where A is the Xcoordinate ... Read More

Sort Elements of an Array in Descending Order in Go

Akhil Sharma
Updated on 02-Jan-2023 15:30:40

791 Views

In this tutorial, we will see to write a go language program to sort an array in descending order. In mathematics, a descending order is an order in which the following element is smaller than the previous element. To Sort An Array In Descending Order Using External Functions In this example, we will see to write a program to sort an array of integers in descending order using user defined function. Algorithm Step 1 − Import the fmt package Step 2 − Define a function sortDesc() to sort the given array. This function accepts one argument as the array ... Read More

Find Rotation Matrix of a Polygon Object Using Fabric.js

Rahul Gurung
Updated on 02-Jan-2023 15:30:16

280 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 find the rotation matrix, we use the _calcRotateMatrix() method. This method returns an Array with given values [cosA, sinA, -sinA, cosA, 0, 0]; where A is the angle of rotation in degrees. Syntax _calcRotateMatrix(): Array Example 1: Using the _calcRotateMatrix ... Read More

Sort Array Elements in Ascending Order using Golang

Akhil Sharma
Updated on 02-Jan-2023 15:29:08

2K+ Views

In this tutorial, we will see to write a go language program to sort an array in ascending order. Sort An Array In Ascending Order Using A User-Defined Function The following code illustrates how we can sort an array of elements in ascending order in golang. Algorithm Step 1 − Import the fmt package. Step 2 − Define a function sortArray() to sort the given array. Step 3 − Pass arguments to sortArray() function one is the array of integers that we wish to sort and the other two variables are used to hold temporary values. Step ... Read More

Draw Octagon with Polygon Object Using FabricJS

Rahul Gurung
Updated on 02-Jan-2023 15:28:17

352 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. Syntax new fabric.Polygon( points: Array, options: Object ) Parameters points − This parameter accepts an Array which denotes the array of points that make up the polygon object. options (optional) − This parameter is an Object which provides additional customizations to our object. Using this ... Read More

Go Program to Sort an Array

Akhil Sharma
Updated on 02-Jan-2023 15:27:39

5K+ Views

In this tutorial, we will see to write a go language program to sort an array using three different methods. Sort An Array Of Integers Using User-Defined Functions The following code illustrates how we can sort an array of elements in golang using user-defined functions. Algorithm Step 1 − Importing the fmt package. Step 2 − Defining a function named sortArray() which will sort the given array. Step 3 − Pass the array to be sorted as an argument to this function. This function uses two for loops to iterate over the array. Step 4 − If ... Read More

Draw Rectangle with Polygon Object Using Fabric.js

Rahul Gurung
Updated on 02-Jan-2023 15:26:22

492 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. Syntax new fabric.Polygon( points: Array, options: Object ) Parameters points − This parameter accepts an Array which denotes the array of points that make up the polygon object. options (optional) − This parameter is an Object which provides additional customizations to our ... Read More

Rotate Matrix Elements in Go

Akhil Sharma
Updated on 02-Jan-2023 15:25:54

957 Views

In this article, we will write a go language program to rotate given matrix element. Rotate A Matrix Using An External Function The following code illustrates rotating a matrix anticlockwise by 90 degrees any number of times. Algorithm Step 1 − Import the fmt package. Step 2 − Create a function to rotate the array elements. This function takes the array to be rotated as argument. Step 3 − Also pass the number of times the array is to be shifted as argument. Further, initialize an empty matrix to hold the final result. Step 4 − In ... Read More

Advertisements