Struct
Point

2D coordinate with double-precision X and Y used in geometry and layout.

Definition

Namespace:Telerik.Documents.Primitives

Assembly:Telerik.Windows.Documents.Core.dll

Syntax:

cs-api-definition
public struct Point

Inherited Members ValueType.ToString()

Constructors

Point(double, double)

Initialize a new Point with X and Y coordinates.

Declaration

cs-api-definition
public Point(double x, double y)

Parameters

x

double

The X coordinate.

y

double

The Y coordinate.

Properties

X

Gets or sets the X coordinate.

Declaration

cs-api-definition
public double X { readonly get; set; }

Property Value

double

Y

Gets or sets the Y coordinate.

Declaration

cs-api-definition
public double Y { readonly get; set; }

Property Value

double

Methods

Equals(object)

Determines whether the specified object, is equal to this instance.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

Overrides ValueType.Equals(object)

GetHashCode()

Returns a hash code for this instance.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides ValueType.GetHashCode()

Offset(double, double)

Offset the location by adding offsetX to X and offsetY to Y.

Declaration

cs-api-definition
public void Offset(double offsetX, double offsetY)

Parameters

offsetX

double

The offset in the x dimension

offsetY

double

The offset in the y dimension

Subtract(Point, Point)

Subtract one point from another and return the displacement vector.

Declaration

cs-api-definition
public static Vector Subtract(Point point1, Point point2)

Parameters

point1

Point

The Point from which point2 is subtracted

point2

Point

The Point subtracted from point1

Returns

Vector

Vector - The result of the subtraction

Operators

operator !=(Point, Point)

Compare two Point instances for exact inequality.

Declaration

cs-api-definition
public static bool operator !=(Point point1, Point point2)

Parameters

point1

Point

The first Point to compare

point2

Point

The second Point to compare

Returns

bool

true if the two Point instances are exactly unequal; false otherwise.

operator +(Point, Vector)

Add a vector to a point to produce a translated point.

Declaration

cs-api-definition
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

operator ==(Point, Point)

Compare two Point instances for exact equality.

Declaration

cs-api-definition
public static bool operator ==(Point point1, Point point2)

Parameters

point1

Point

The first Point to compare.

point2

Point

The second Point to compare.

Returns

bool

true if the two Point instances are exactly equal; false otherwise.