New to Telerik Reporting? Start a free 30-day trial

PointU

Struct

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

Definition

Namespace:Telerik.Reporting.Drawing

Assembly:Telerik.Reporting.dll

Syntax:

C#
[TypeConverter(typeof(PointUConverter))]
public struct PointU

Constructors

Initializes a new instance of the

C#
public PointU(Point pointDips)
Parameters:pointDipsPoint

A Point whose coordinates to use.

Initializes a new instance of the

C#
public PointU(PointF pointDips)
Parameters:pointDipsPointF

A PointF whose coordinates to use.

Initializes a new instance of the PointU class with the specified coordinates.

C#
public PointU(Unit x, Unit y)
Parameters:xUnit

The horizontal position of the point.

yUnit

The vertical position of the point.

Fields

Represents a new instance of the PointU class with member data left uninitialized.

C#
public static readonly PointU Empty

Properties

Gets a value indicating whether this PointU is empty.

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

true if both X and Y are equal to zero; otherwise, false.

Gets or sets the x-coordinate of this PointU

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

The x-coordinate of this PointU.

Gets or sets the y-coordinate of this PointU

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

The y-coordinate of this PointU.

Methods

Specifies whether this PointU contains the same coordinates as the specified Object.

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

The object to test.

Returns:

bool

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

Overrides: ValueType.Equals(object)

Returns a hash code for this PointU structure.

C#
public override int GetHashCode()
Returns:

int

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

Overrides: ValueType.GetHashCode()

Offsets this PointU structure by a specified amount in the x- and y-direction.

C#
public void Offset(Unit dx, Unit dy)
Parameters:dxUnit

A Unit value specifying the amount to offset in the horizontal direction.

dyUnit

A Unit value specifying the amount to offset in the vertical direction.

Converts this PointU to a human readable string.

C#
public override string ToString()
Returns:

string

A string that represents this PointU.

Overrides: ValueType.ToString()

Converts this PointU to a human readable string according to the CultureInfo specified.

C#
public string ToString(CultureInfo culture)
Parameters:cultureCultureInfo

A CultureInfo that is used to format the string.

Returns:

string

A string that represents this PointU.

Operators

Converts the specified reporting PointU to a Point in device-dependent pixels.

C#
public static explicit operator Point(PointU point)
Parameters:pointPointU

The PointU to convert.

Returns:

Point

The Point that is converted from the specified reporting Point structure.

Converts the specified reporting PointU to a PointF in device-dependent pixels.

C#
public static explicit operator PointF(PointU point)
Parameters:pointPointU

The PointU to convert.

Returns:

PointF

The PointF that is converted from the specified reporting Point structure.

Translates the PointU by the negative of a specified SizeU.

C#
public static PointU operator -(PointU pt, SizeU size)
Parameters:ptPointU

The PointU to translate.

sizeSizeU

The SizeU that specifies the numbers to subtract from the x- and y-coordinates of the PointU.

Returns:

PointU

The translated PointU.

The op_Subtraction operator subtracts the Width of the specified size from the x-coordinate of the PointU and the Height from the y-coordinate of the PointU.

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

C#
public static bool operator !=(PointU pt1, PointU pt2)
Parameters:pt1PointU

A PointU to compare.

pt2PointU

A PointU to compare.

Returns:

bool

true to indicate the X and Y values of pt1 and pt2 are not equal; otherwise, false.

Translates the PointU by the specified SizeU.

C#
public static PointU operator +(PointU pt, SizeU size)
Parameters:ptPointU

The PointU to translate.

sizeSizeU

The SizeU that specifies the numbers to add to the x- and y-coordinates of the PointU.

Returns:

PointU

The translated PointU.

The op_Addition operator adds the Width of the specified size to the x-coordinate of the PointU and the Height to the y-coordinate of the PointU.

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

C#
public static bool operator ==(PointU pt1, PointU pt2)
Parameters:pt1PointU

A PointU to compare.

pt2PointU

A PointU to compare.

Returns:

bool

true if the X and Y values of the left and right PointU structures are equal; otherwise, false.