ClassPointExtensions
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
Add(Point, Point)
Adds the specified points together.
Declaration
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
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
public static double Distance(this Point point)
Parameters
point
Point
The point.
Returns
Distance(Point, Point)
Returns the distance between the specified points.
Declaration
public static double Distance(this Point startPoint, Point endPoint)
Parameters
startPoint
Point
The start point.
endPoint
Point
The end point.
Returns
Distance(Point, Rect)
Distances to rectangle.
Declaration
public static double Distance(this Point point, Rect rect)
Parameters
point
Point
The point.
rect
Rect
The rectangle.
Returns
DistancePoint(Point, Rect)
Distance to rectangle.
Declaration
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
public static Point Divide(this Point point, double factor)
Parameters
point
Point
The point.
factor
The factor.
Returns
Point
IsEmpty(Point)
Determines whether the specified point is empty.
Declaration
public static bool IsEmpty(this Point point)
Parameters
point
Point
The point.
Returns
True if the specified point is empty; otherwise, false.
IsXBetween(Point, Point, Point)
Determines whether [is X between] [the specified point].
Declaration
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
true if [is X between] [the specified point]; otherwise, false.
IsYBetween(Point, Point, Point)
Determines whether [is Y between] [the specified point].
Declaration
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
true if [is Y between] [the specified point]; otherwise, false.
Multiply(Point, double)
Multiplies the point with the specified multiplier.
Declaration
public static Point Multiply(this Point point, double multiplier)
Parameters
point
Point
The point.
multiplier
The multiplier.
Returns
Point
Rotate(Point, Point, double)
Rotates the point.
Declaration
public static Point Rotate(this Point point, Point pivot, double angle)
Parameters
point
Point
The point.
pivot
Point
The pivot.
angle
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.
Substract(Point, Point)
Subtracts point2 from point1.
Declaration
public static Point Substract(this Point point1, Point point2)
Parameters
point1
Point
point2
Point
Returns
Point
Subtract(Point, Point)
Subtracts the specified point1.
Declaration
public static Vector Subtract(this Point point1, Point point2)
Parameters
point1
Point
point2
Point
Returns
Vector