Class PointExtensions
Extensions for the Point class.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public static class PointExtensions
Methods
Add(Point, Point)
Adds the specified points together.
Declaration
public static Point Add(this Point point, Point point2)
Parameters
System.Windows.Point
point
A point. |
System.Windows.Point
point2
The point2. |
Returns
System.Windows.Point
The augmented point. |
See Also
Add(Point, Vector)
Adds the specified point and vector together.
Declaration
public static Point Add(this Point point, Vector vector)
Parameters
System.Windows.Point
point
A point. |
System.Windows.Vector
vector
A vector. |
Returns
System.Windows.Point
The augmented point. |
See Also
Distance(Point)
Returns the distance of the point to the origin.
Declaration
public static double Distance(this Point point)
Parameters
System.Windows.Point
point
The point. |
Returns
System.Double
|
Distance(Point, Point)
Returns the distance between the specified points.
Declaration
public static double Distance(this Point startPoint, Point endPoint)
Parameters
System.Windows.Point
startPoint
The start point. |
System.Windows.Point
endPoint
The end point. |
Returns
System.Double
|
Distance(Point, Rect)
Distances to rectangle.
Declaration
public static double Distance(this Point point, Rect rect)
Parameters
System.Windows.Point
point
The point. |
System.Windows.Rect
rect
The rectangle. |
Returns
System.Double
|
DistancePoint(Point, Rect)
Distance to rectangle.
Declaration
public static Point DistancePoint(this Point point, Rect rect)
Parameters
System.Windows.Point
point
The point. |
System.Windows.Rect
rect
The rectangle. |
Returns
System.Windows.Point
|
Divide(Point, Double)
Divides the point with the specified factor.
Declaration
public static Point Divide(this Point point, double factor)
Parameters
System.Windows.Point
point
The point. |
System.Double
factor
The factor. |
Returns
System.Windows.Point
|
IsEmpty(Point)
Determines whether the specified point is empty.
Declaration
public static bool IsEmpty(this Point point)
Parameters
System.Windows.Point
point
The point. |
Returns
System.Boolean
|
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
System.Windows.Point
point
The point. |
System.Windows.Point
firstPoint
The first point. |
System.Windows.Point
secondPoint
The second point. |
Returns
System.Boolean
|
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
System.Windows.Point
point
The point. |
System.Windows.Point
firstPoint
The first point. |
System.Windows.Point
secondPoint
The second point. |
Returns
System.Boolean
|
Multiply(Point, Double)
Multiplies the point with the specified multiplier.
Declaration
public static Point Multiply(this Point point, double multiplier)
Parameters
System.Windows.Point
point
The point. |
System.Double
multiplier
The multiplier. |
Returns
System.Windows.Point
|
Rotate(Point, Point, Double)
Rotates the point.
Declaration
public static Point Rotate(this Point point, Point pivot, double angle)
Parameters
System.Windows.Point
point
The point. |
System.Windows.Point
pivot
The pivot. |
System.Double
angle
The angle. |
Returns
System.Windows.Point
|
Snap(Point, Int32, Int32)
Snaps a point by changing the X and Y coordinates to the closest value dividable by the snapping value.
Declaration
public static Point Snap(this Point point, int snapX, int snapY)
Parameters
System.Windows.Point
point
The point. |
System.Int32
snapX
The horizontal snapping value. |
System.Int32
snapY
The vertical snapping value. |
Returns
System.Windows.Point
Returns the snapped point. |
Substract(Point, Point)
Subtracts point2 from point1.
Declaration
public static Point Substract(this Point point1, Point point2)
Parameters
System.Windows.Point
point1
|
System.Windows.Point
point2
|
Returns
System.Windows.Point
|
Subtract(Point, Point)
Subtracts the specified point1.
Declaration
public static Vector Subtract(this Point point1, Point point2)
Parameters
System.Windows.Point
point1
|
System.Windows.Point
point2
|
Returns
System.Windows.Vector
|