New to Kendo UI for AngularStart a free 30-day trial

Point

Class

A point representing a location (x, y) in two-dimensional coordinate space.

Definition

Package:@progress/kendo-drawing

Methods

Adds an observer to be notified for changes.

Parameters:observerGeometryObserver

The observer to add.

Returns:

Point

  • The current Arc instance.

Creates a new instance with the same coordinates.

Returns:

Point

  • A new Point instance with the same coordinates.

Creates a Point instance with the specified coordinates.

Parameters:xnumber

The X coordinate of the point

ynumber

The Y coordinate of the point.

Returns:

Point

  • The new Point instance.

Creates a Point instance with the specified coordinates.

Parameters:coordsnumber[]

An array of X and Y coordinates.

Returns:

Point

  • The new Point instance.

Returns the supplied Point instance.

Parameters:pointPoint

An existing Point instance.

Returns:

Point

  • The supplied Point instance.

Calculates the distance to another point.

Parameters:pointPoint

The point to calculate the distance to.

Returns:

number

  • The straight-line distance to the given point.

Compares this point with another instance.

Parameters:otherPoint

The point to compare with.

Returns:

boolean

true if the point coordinates match. Otherwise, returns false.

Gets the x coordinate value.

Returns:

number

  • The current X-coordinate value.

Gets the Y-coordinate value.

Returns:

number

  • The current Y-coordinate value.

Returns the Point with maximum X and Y coordinates.

Parameters:pointsPoint[]

The points to evaluate.

Returns:

Point

  • The Point with maximum X and Y coordinates.

Returns a Point with the largest representable coordinates.

Returns:

Point

  • A new Point instance with maximum coordinates.

Returns the Point with minimum X and Y coordinates.

Parameters:pointsPoint[]

The points to evaluate.

Returns:

Point

  • The Point with minimum X and Y coordinates.

Returns a Point with the smallest representable coordinates.

Returns:

Point

  • A new Point instance with minimum coordinates.

Moves the point to the specified X and Y coordinates.

Parameters:xnumber

The new X coordinate.

ynumber

The new Y coordinate.

Returns:

Point

  • The current point instance.

Returns the list of observers.

Returns:

GeometryObserver[]

  • The current observers.

Stops notifying the specified observer for changes.

Parameters:observerGeometryObserver

The observer to remove.

Returns:

Point

  • The current Arc instance.

Resumes the notification to all observers for changes.

Returns:

Point

  • The current Arc instance.

Rotates the point around the given center.

Parameters:anglenumber

The angle in decimal degrees. Measured in a clockwise direction with 0 (zero) pointing "right". Negative values or values greater than 360 are normalized.

centerPoint | number[]

The rotation center. Can be a Point instance or an [x, y] array.

Returns:

Point

  • The current Point instance.

Rounds the point coordinates to the specified number of fractional digits.

Parameters:digitsnumber

The number of fractional digits.

Returns:

Point

  • The current Point instance.

Scales the point coordinates along the X and Y axis.

Parameters:scaleXnumber

The X scale multiplier.

scaleYnumber

The Y scale multiplier.

Returns:

Point

  • The current Point instance.

Scales the point coordinates on a copy of the current point. The callee coordinates will remain unchanged.

Parameters:scaleXnumber

The X scale multiplier.

scaleYnumber

The Y scale multiplier.

Returns:

Point

  • The current Point instance.

Sets the X coordinate to a new value.

Parameters:valuenumber

The new X coordinate value.

Returns:

Point

  • The current Point instance.

Sets the Y coordinate to a new value.

Parameters:valuenumber

The new Y coordinate value.

Returns:

Point

  • The current Point instance.

Suspends the change notifications to all observers.

Returns:

Point

  • The current Arc instance.

Returns the point coordinates as an [X, Y] array.

Parameters:digits?number

The number of fractional digits.

Returns:

number[]

  • An array representation of the point. For example, [10, 20].

Formats the point value to a string.

Parameters:digits?number

The number of fractional digits.

separator?string

The separator to place between coordinates.

Returns:

string

  • A string representation of the point. For example, "10, 20".

Applies a transformation to the point coordinates. The current coordinates will be overridden.

Parameters:tansformationTransformation

The transformation to apply.

Returns:

Point

  • The current Point instance.

Applies a transformation on a copy of the current point. The callee coordinates will remain unchanged.

Parameters:tansformationTransformation

The transformation to apply.

Returns:

Point

  • The new Point instance.

Translates the point along the X and Y axis.

Parameters:dxnumber

The distance to move along the X axis.

dynumber

The distance to move along the Y axis.

Returns:

Point

  • The current Point instance.

Translates the point by using a Point instance as a vector of translation.

Parameters:vectorPoint | number[]

The vector of translation. Can be either a Point instance or an [x, y] array.

Returns:

Point

  • The current point instance.

Properties

x

number

The X coordinate of the point.

y

number

The Y coordinate of the point.