PointExtensions
Extensions for the Point class.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Syntax:
public static class PointExtensions
Inheritance: objectPointExtensions
Methods
Adds the specified points together.
public static Point Add(this Point point, Point point2)
A point.
point2PointThe point2.
Returns:Point
The augmented point.
Adds the specified point and vector together.
public static Point Add(this Point point, Vector vector)
A point.
vectorVectorA vector.
Returns:Point
The augmented point.
Returns the distance between the specified points.
public static double Distance(this Point startPoint, Point endPoint)
The start point.
endPointPointThe end point.
Returns:Distances to rectangle.
public static double Distance(this Point point, Rect rect)
The point.
rectRectThe rectangle.
Returns:Returns the distance of the point to the origin.
Distance to rectangle.
public static Point DistancePoint(this Point point, Rect rect)
The point.
rectRectThe rectangle.
Returns:Point
Divides the point with the specified factor.
public static Point Divide(this Point point, double factor)
The point.
factordoubleThe factor.
Returns:Point
Determines whether the specified point is empty.
public static bool IsEmpty(this Point point)
The point.
Returns:True if the specified point is empty; otherwise, false.
Determines whether [is X between] [the specified point].
public static bool IsXBetween(this Point point, Point firstPoint, Point secondPoint)
The point.
firstPointPointThe first point.
secondPointPointThe second point.
Returns:true if [is X between] [the specified point]; otherwise, false.
Determines whether [is Y between] [the specified point].
public static bool IsYBetween(this Point point, Point firstPoint, Point secondPoint)
The point.
firstPointPointThe first point.
secondPointPointThe second point.
Returns:true if [is Y between] [the specified point]; otherwise, false.
Multiplies the point with the specified multiplier.
public static Point Multiply(this Point point, double multiplier)
The point.
multiplierdoubleThe multiplier.
Returns:Point
Rotates the point.
public static Point Rotate(this Point point, Point pivot, double angle)
The point.
pivotPointThe pivot.
angledoubleThe angle.
Returns:Point
Snaps a point by changing the X and Y coordinates to the closest value dividable by the snapping value.
Subtracts point2 from point1.
public static Point Substract(this Point point1, Point point2)
Point
Subtracts the specified point1.
public static Vector Subtract(this Point point1, Point point2)
Vector