New to Telerik ReportingStart a free 30-day trial

SizeU

Struct

Stores an ordered pair of Unit-based numbers, typically the width and height of a rectangle.

Definition

Namespace:Telerik.Reporting.Drawing

Assembly:Telerik.Reporting.dll

Syntax:

C#
[TypeConverter(typeof(SizeUConverter))]
public struct SizeU

Constructors

Initializes a new instance of the SizeU class from the specified existing Size in device-independent pixels.

C#
public SizeU(Size sizeDips)
Parameters:sizeDipsSize

The Size from which to create the new SizeU.

Initializes a new instance of the SizeU class from the specified existing SizeF in device-independent pixels.

C#
public SizeU(SizeF sizeDips)
Parameters:sizeDipsSizeF

The SizeF from which to create the new SizeU.

Initializes a new instance of the SizeU class from the specified dimensions.

C#
public SizeU(Unit width, Unit height)
Parameters:widthUnit

The width component of the new SizeU.

heightUnit

The height component of the new SizeU.

Fields

Initializes a new instance of the SizeU class.

C#
public static readonly SizeU Empty

Properties

Gets or sets the vertical component of this SizeU.

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

The vertical component of this SizeU.

Gets a value indicating whether this SizeU has zero width and height.

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

This property returns true when this SizeU has both a width and height of zero; otherwise, false.

Gets or sets the horizontal component of this SizeU.

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

The horizontal component of this SizeU.

Methods

Tests to see whether the specified object is a SizeU with the same dimensions as this SizeU.

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

The object to test.

Returns:

bool

This method returns true if obj is a SizeU and has the same width and height as this SizeU; otherwise, false.

Overrides: ValueType.Equals(object)

Returns a hash code for this SizeU structure.

C#
public override int GetHashCode()
Returns:

int

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

Overrides: ValueType.GetHashCode()

Creates a human-readable string that represents this SizeU.

C#
public override string ToString()
Returns:

string

A string that represents this SizeU.

Overrides: ValueType.ToString()

Creates a human-readable string that represents this SizeU.

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

A CultureInfo object according to which to format the string.

Returns:

string

A string that represents this SizeU.

Operators

Converts the specified SizeU to a Size in device-dependent pixels.

C#
public static explicit operator Size(SizeU size)
Parameters:sizeSizeU

The SizeU structure to be converted.

Returns:

Size

The Size structure to which this operator converts.

Converts the specified SizeU to a

C#
public static explicit operator SizeF(SizeU size)
Parameters:sizeSizeU

The SizeU structure to be converted.

Returns:

SizeF

The SizeF structure to which this operator converts.

Subtracts the width and height of one SizeU structure from the width and height of another SizeU structure.

C#
public static SizeU operator -(SizeU size1, SizeU size2)
Parameters:size1SizeU

The SizeU on the left side of the subtraction operator.

size2SizeU

The SizeU on the right side of the subtraction operator.

Returns:

SizeU

A SizeU structure that is the result of the subtraction operation.

Tests whether two SizeU structures are different.

C#
public static bool operator !=(SizeU size1, SizeU size2)
Parameters:size1SizeU

The SizeU structure on the left side of the equality operator.

size2SizeU

The SizeU structure on the right side of the equality operator.

Returns:

bool

This operator returns true if size1 and size2 differ either in width or height; false if size1 and size2 are equal.

Multiplies a SizeU by a specified value.

C#
public static SizeU operator *(SizeU size, double value)
Parameters:sizeSizeU

The SizeU to multiply.

valuedouble

A double value to multiply by.

Returns:

SizeU

A SizeU that is the product of size and value.

Devides a SizeU by a specified value.

C#
public static SizeU operator /(SizeU size, double value)
Parameters:sizeSizeU

The SizeU to divide (scale).

valuedouble

A double value to divide by.

Returns:

SizeU

A SizeU that is the quotient of size and value.

Adds the width and height of one SizeU structure to the width and height of another SizeU structure.

C#
public static SizeU operator +(SizeU size1, SizeU size2)
Parameters:size1SizeU

The first SizeU to add.

size2SizeU

The second SizeU to add.

Returns:

SizeU

A SizeU structure that is the result of the addition operation.

Tests whether two SizeU structures are equal.

C#
public static bool operator ==(SizeU size1, SizeU size2)
Parameters:size1SizeU

The SizeU structure on the left side of the equality operator.

size2SizeU

The SizeU structure on the right side of the equality operator.

Returns:

bool

This operator returns true if size1 and size2 have equal width and height; otherwise, false.