New to Telerik UI for WPFStart a free 30-day trial

Extensions for the Point class.

Definition

Namespace:Telerik.Windows.Diagrams.Core

Assembly:Telerik.Windows.Diagrams.Core.dll

Syntax:

C#
public static class PointExtensions

Inheritance: objectPointExtensions

Methods

Adds the specified points together.

C#
public static Point Add(this Point point, Point point2)
Parameters:pointPoint

A point.

point2Point

The point2.

Returns:

Point

The augmented point.

Adds the specified point and vector together.

C#
public static Point Add(this Point point, Vector vector)
Parameters:pointPoint

A point.

vectorVector

A vector.

Returns:

Point

The augmented point.

Returns the distance between the specified points.

C#
public static double Distance(this Point startPoint, Point endPoint)
Parameters:startPointPoint

The start point.

endPointPoint

The end point.

Returns:

double

Distances to rectangle.

C#
public static double Distance(this Point point, Rect rect)
Parameters:pointPoint

The point.

rectRect

The rectangle.

Returns:

double

Returns the distance of the point to the origin.

C#
public static double Distance(this Point point)
Parameters:pointPoint

The point.

Returns:

double

Distance to rectangle.

C#
public static Point DistancePoint(this Point point, Rect rect)
Parameters:pointPoint

The point.

rectRect

The rectangle.

Returns:

Point

Divides the point with the specified factor.

C#
public static Point Divide(this Point point, double factor)
Parameters:pointPoint

The point.

factordouble

The factor.

Returns:

Point

Determines whether the specified point is empty.

C#
public static bool IsEmpty(this Point point)
Parameters:pointPoint

The point.

Returns:

bool

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

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

C#
public static bool IsXBetween(this Point point, Point firstPoint, Point secondPoint)
Parameters:pointPoint

The point.

firstPointPoint

The first point.

secondPointPoint

The second point.

Returns:

bool

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

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

C#
public static bool IsYBetween(this Point point, Point firstPoint, Point secondPoint)
Parameters:pointPoint

The point.

firstPointPoint

The first point.

secondPointPoint

The second point.

Returns:

bool

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

Multiplies the point with the specified multiplier.

C#
public static Point Multiply(this Point point, double multiplier)
Parameters:pointPoint

The point.

multiplierdouble

The multiplier.

Returns:

Point

Rotates the point.

C#
public static Point Rotate(this Point point, Point pivot, double angle)
Parameters:pointPoint

The point.

pivotPoint

The pivot.

angledouble

The angle.

Returns:

Point

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

C#
public static Point Snap(this Point point, int snapX, int snapY)
Parameters:pointPoint

The point.

snapXint

The horizontal snapping value.

snapYint

The vertical snapping value.

Returns:

Point

Returns the snapped point.

Subtracts point2 from point1.

C#
public static Point Substract(this Point point1, Point point2)
Parameters:point1Pointpoint2PointReturns:

Point

Subtracts the specified point1.

C#
public static Vector Subtract(this Point point1, Point point2)
Parameters:point1Pointpoint2PointReturns:

Vector