Struct Point
Point structure in a 2D space, defined by two double values for the coordinates.
Inherited Members
Namespace: Telerik.Documents.Primitives
Assembly: Telerik.Windows.Documents.Core.dll
Syntax
public struct Point
Constructors
Point(Double, Double)
Initializes a new instance of the Point structure.
Declaration
public Point(double x, double y)
Parameters
System.Double
x
The X coordinate. |
System.Double
y
The Y coordinate. |
Properties
X
The X coordinate. Default value is 0.
Declaration
public double X { get; set; }
Property Value
System.Double
|
Y
The Y coordinate. Default value is 0.
Declaration
public double Y { get; set; }
Property Value
System.Double
|
Methods
Equals(Object)
Determines whether the specified System.Object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
The System.Object to compare with this instance. |
Returns
System.Boolean
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System.Int32
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Offset(Double, Double)
Offset - update the location by adding offsetX to X and offsetY to Y
Declaration
public void Offset(double offsetX, double offsetY)
Parameters
System.Double
offsetX
The offset in the x dimension |
System.Double
offsetY
The offset in the y dimension |
Subtract(Point, Point)
Subtract: Point - Point
Declaration
public static Vector Subtract(Point point1, Point point2)
Parameters
Point
point1
The Point from which point2 is subtracted |
Point
point2
The Point subtracted from point1 |
Returns
Vector
Vector - The result of the subtraction |
Operators
Addition(Point, Vector)
Operator Point + Vector
Declaration
public static Point operator +(Point point, Vector vector)
Parameters
Point
point
The Point to be added to the Vector |
Vector
vector
The Vectr to be added to the Point |
Returns
Point
Point - The result of the addition |
Equality(Point, Point)
Compares two Point instances for exact equality.
Declaration
public static bool operator ==(Point point1, Point point2)
Parameters
Point
point1
The first Point to compare. |
Point
point2
The second Point to compare. |
Returns
System.Boolean
true if the two Point instances are exactly equal; false otherwise. |
Inequality(Point, Point)
Compares two Point instances for exact inequality.
Declaration
public static bool operator !=(Point point1, Point point2)
Parameters
Point
point1
The first Point to compare |
Point
point2
The second Point to compare |
Returns
System.Boolean
true if the two Point instances are exactly unequal; false otherwise. |