New to Telerik UI for WPFStart a free 30-day trial

PointF

Struct

Represents a structure that is used to describe size of an object using float values.

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public struct PointF

Constructors

Initializes a new instance of the PointF struct.

C#
public PointF(float x, float y)
Parameters:xfloat

The x.

yfloat

The y.

Fields

An empty point with (0, 0) coordinates.

C#
public static readonly PointF Empty

Properties

Gets a value indicating whether this instance is an empty point.

C#
[Browsable(false)]
public bool IsEmpty { get; }
Property Value:

true if this instance is empty; otherwise, false.

Gets or sets the X coordinate.

C#
public float X { readonly get; set; }
Property Value:

The x.

Gets or sets the Y coordinate.

C#
public float Y { readonly get; set; }
Property Value:

The y.

Methods

Adds size to a specified point.

C#
public static PointF Add(PointF point, Size size)
Parameters:pointPointF

The point.

sizeSize

The size.

Returns:

PointF

Adds size to a specified point.

C#
public static PointF Add(PointF point, SizeF size)
Parameters:pointPointF

The point.

sizeSizeF

The size.

Returns:

PointF

Computes distance between two points.

C#
public static float Distance(PointF point1, PointF point2)
Parameters:point1PointF

The point1.

point2PointF

The point2.

Returns:

float

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

C#
public override bool Equals(object obj)
Parameters:objobject

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)

Returns a hash code for this instance.

C#
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()

Rounds each coordinate of the point.

C#
public PointF Round()
Returns:

PointF

Subtracts size from a specified point.

C#
public static PointF Subtract(PointF point, Size size)
Parameters:pointPointF

The point.

sizeSize

The size.

Returns:

PointF

Subtracts size from a specified point.

C#
public static PointF Subtract(PointF point, SizeF size)
Parameters:pointPointF

The point.

sizeSizeF

The size.

Returns:

PointF

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: ValueType.ToString()

Operators

Implements the operator -.

C#
public static PointF operator -(PointF point, Size size)
Parameters:pointPointF

The point.

sizeSize

The size to be subtracted.

Returns:

PointF

The result of the operator.

Implements the operator -.

C#
public static PointF operator -(PointF point, SizeF size)
Parameters:pointPointF

The point.

sizeSizeF

The size to be subtracted.

Returns:

PointF

The result of the operator.

Implements the operator !=.

C#
public static bool operator !=(PointF left, PointF right)
Parameters:leftPointF

The left.

rightPointF

The right.

Returns:

bool

True if the points are with different coordinates, otherwise false.

Implements the operator +.

C#
public static PointF operator +(PointF point, Size size)
Parameters:pointPointF

The point.

sizeSize

The size to be added.

Returns:

PointF

The result of the operator.

Implements the operator +.

C#
public static PointF operator +(PointF point, SizeF size)
Parameters:pointPointF

The point.

sizeSizeF

The size to be added.

Returns:

PointF

The result of the operator.

Implements the operator ==.

C#
public static bool operator ==(PointF left, PointF right)
Parameters:leftPointF

The left point.

rightPointF

The right point.

Returns:

bool

True if the points are with same coordinates, otherwise false.

Extension Methods