Table of Contents

Struct PointF

Namespace
Aspose.Imaging
Assembly
Aspose.Imaging.dll

Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.

public struct PointF
Inherited Members

Constructors

PointF(float, float)

Initializes a new instance of the PointF structure with the specified coordinates.

public PointF(float x, float y)

Parameters

x float

The horizontal position of the point.

y float

The vertical position of the point.

Properties

Empty

Gets a new instance of the PointF structure that has X and Y values set to zero.

public static PointF Empty { get; }

Property Value

PointF

IsEmpty

Gets a value indicating whether this PointF is empty.

public bool IsEmpty { get; }

Property Value

bool

True if both X and Y are 0; otherwise, false.

X

Gets or sets the x-coordinate of this PointF.

public float X { get; set; }

Property Value

float

Y

Gets or sets the y-coordinate of this PointF.

public float Y { get; set; }

Property Value

float

Methods

Add(PointF, Size)

Translates a given PointF by the specified Size.

public static PointF Add(PointF point, Size size)

Parameters

point PointF

The PointF to translate.

size Size

The Size that specifies the numbers to add to the coordinates of point.

Returns

PointF

The translated PointF.

Add(PointF, SizeF)

Translates a given PointF by a specified SizeF.

public static PointF Add(PointF point, SizeF size)

Parameters

point PointF

The PointF to translate.

size SizeF

The SizeF that specifies the numbers to add to the coordinates of point.

Returns

PointF

The translated PointF.

Equals(object)

Specifies whether this PointF contains the same coordinates as the specified object.

public override bool Equals(object obj)

Parameters

obj object

The object to test.

Returns

bool

This method returns true if obj is a PointF and has the same coordinates as this Point.

GetHashCode()

Returns a hash code for this PointF structure.

public override int GetHashCode()

Returns

int

An integer value that specifies a hash value for this PointF structure.

Subtract(PointF, Size)

Translates a PointF by the negative of a specified size.

public static PointF Subtract(PointF point, Size size)

Parameters

point PointF

The PointF to translate.

size Size

The Size that specifies the numbers to subtract from the coordinates of point.

Returns

PointF

The translated PointF.

Subtract(PointF, SizeF)

Translates a PointF by the negative of a specified size.

public static PointF Subtract(PointF point, SizeF size)

Parameters

point PointF

The PointF to translate.

size SizeF

The SizeF that specifies the numbers to subtract from the coordinates of point.

Returns

PointF

The translated PointF.

ToString()

Converts this PointF to a human readable string.

public override string ToString()

Returns

string

A string that represents this PointF.

Operators

operator +(PointF, Size)

Translates a PointF by a given Size.

public static PointF operator +(PointF point, Size size)

Parameters

point PointF

The PointF to translate.

size Size

A Size that specifies the pair of numbers to add to the coordinates of point.

Returns

PointF

Returns the translated PointF.

operator +(PointF, SizeF)

Translates the PointF by the specified SizeF.

public static PointF operator +(PointF point, SizeF size)

Parameters

point PointF

The PointF to translate.

size SizeF

The SizeF that specifies the numbers to add to the x- and y-coordinates of the point.

Returns

PointF

The translated PointF.

operator ==(PointF, PointF)

Compares two PointF structures. The result specifies whether the values of the X and Y properties of the two PointF structures are equal.

public static bool operator ==(PointF point1, PointF point2)

Parameters

point1 PointF

A first PointF to compare.

point2 PointF

A second PointF to compare.

Returns

bool

True if the X and Y values of the first and second PointF structures are equal; otherwise, false.

operator !=(PointF, PointF)

Determines whether the coordinates of the specified points are not equal.

public static bool operator !=(PointF point1, PointF point2)

Parameters

point1 PointF

A first PointF to compare.

point2 PointF

A second PointF to compare.

Returns

bool

True to indicate the X and Y values of point1 and point2 are not equal; otherwise, false.

operator -(PointF, Size)

Translates a PointF by the negative of a given Size.

public static PointF operator -(PointF point, Size size)

Parameters

point PointF

A PointF to translate.

size Size

A Size that specifies the numbers to subtract from the x- and y-coordinates of the point.

Returns

PointF

The translated PointF.

operator -(PointF, SizeF)

Translates a PointF by the negative of a specified SizeF.

public static PointF operator -(PointF point, SizeF size)

Parameters

point PointF

The PointF to translate.

size SizeF

The SizeF that specifies the numbers to subtract from the coordinates of point.

Returns

PointF

The translated PointF.