Class
PointExtensions

Extensions for the Point class.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

cs-api-definition
public static class PointExtensions

Inheritance: objectPointExtensions

Methods

Add(Point, Point)

Adds the specified points together.

Declaration

cs-api-definition
public static Point Add(this Point point, Point point2)

Parameters

point

Point

A point.

point2

Point

The point2.

Returns

Point

The augmented point.

Add(Point, Vector)

Adds the specified point and vector together.

Declaration

cs-api-definition
public static Point Add(this Point point, Vector vector)

Parameters

point

Point

A point.

vector

Vector

A vector.

Returns

Point

The augmented point.

Distance(Point)

Returns the distance of the point to the origin.

Declaration

cs-api-definition
public static double Distance(this Point point)

Parameters

point

Point

The point.

Returns

double

Distance(Point, Point)

Returns the distance between the specified points.

Declaration

cs-api-definition
public static double Distance(this Point startPoint, Point endPoint)

Parameters

startPoint

Point

The start point.

endPoint

Point

The end point.

Returns

double

Distance(Point, Rect)

Distances to rectangle.

Declaration

cs-api-definition
public static double Distance(this Point point, Rect rect)

Parameters

point

Point

The point.

rect

Rect

The rectangle.

Returns

double

DistancePoint(Point, Rect)

Distance to rectangle.

Declaration

cs-api-definition
public static Point DistancePoint(this Point point, Rect rect)

Parameters

point

Point

The point.

rect

Rect

The rectangle.

Returns

Point

Divide(Point, double)

Divides the point with the specified factor.

Declaration

cs-api-definition
public static Point Divide(this Point point, double factor)

Parameters

point

Point

The point.

factor

double

The factor.

Returns

Point

IsEmpty(Point)

Determines whether the specified point is empty.

Declaration

cs-api-definition
public static bool IsEmpty(this Point point)

Parameters

point

Point

The point.

Returns

bool

True if the specified point is empty; otherwise, false.

IsXBetween(Point, Point, Point)

Determines whether [is X between] [the specified point].

Declaration

cs-api-definition
public static bool IsXBetween(this Point point, Point firstPoint, Point secondPoint)

Parameters

point

Point

The point.

firstPoint

Point

The first point.

secondPoint

Point

The second point.

Returns

bool

true if [is X between] [the specified point]; otherwise, false.

IsYBetween(Point, Point, Point)

Determines whether [is Y between] [the specified point].

Declaration

cs-api-definition
public static bool IsYBetween(this Point point, Point firstPoint, Point secondPoint)

Parameters

point

Point

The point.

firstPoint

Point

The first point.

secondPoint

Point

The second point.

Returns

bool

true if [is Y between] [the specified point]; otherwise, false.

Multiply(Point, double)

Multiplies the point with the specified multiplier.

Declaration

cs-api-definition
public static Point Multiply(this Point point, double multiplier)

Parameters

point

Point

The point.

multiplier

double

The multiplier.

Returns

Point

Rotate(Point, Point, double)

Rotates the point.

Declaration

cs-api-definition
public static Point Rotate(this Point point, Point pivot, double angle)

Parameters

point

Point

The point.

pivot

Point

The pivot.

angle

double

The angle.

Returns

Point

Snap(Point, int, int)

Snaps a point by changing the X and Y coordinates to the closest value dividable by the snapping value.

Declaration

cs-api-definition
public static Point Snap(this Point point, int snapX, int snapY)

Parameters

point

Point

The point.

snapX

int

The horizontal snapping value.

snapY

int

The vertical snapping value.

Returns

Point

Returns the snapped point.

Substract(Point, Point)

Subtracts point2 from point1.

Declaration

cs-api-definition
public static Point Substract(this Point point1, Point point2)

Parameters

point1

Point

point2

Point

Returns

Point

Subtract(Point, Point)

Subtracts the specified point1.

Declaration

cs-api-definition
public static Vector Subtract(this Point point1, Point point2)

Parameters

point1

Point

point2

Point

Returns

Vector