Size Structure
Collapse the table of content
Expand the table of content

Size Structure

 

Stores an ordered pair of integers, which specify a Height and Width.

Namespace:   System.Drawing
Assembly:  System.Drawing (in System.Drawing.dll)

[<Sealed>]
[<SerializableAttribute>]
[<TypeConverterAttribute(typeof(SizeConverter))>]
[<ComVisibleAttribute(true)>]
type Size = struct end

NameDescription
System_CAPS_pubmethodSize(Int32, Int32)

Initializes a new instance of the Size structure from the specified dimensions.

System_CAPS_pubmethodSize(Point)

Initializes a new instance of the Size structure from the specified Point structure.

NameDescription
System_CAPS_pubpropertyHeight

Gets or sets the vertical component of this Size structure.

System_CAPS_pubpropertyIsEmpty

Tests whether this Size structure has width and height of 0.

System_CAPS_pubpropertyWidth

Gets or sets the horizontal component of this Size structure.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAdd(Size, Size)

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

System_CAPS_pubmethodSystem_CAPS_staticCeiling(SizeF)

Converts the specified SizeF structure to a Size structure by rounding the values of the Size structure to the next higher integer values.

System_CAPS_pubmethodEquals(Object)

Tests to see whether the specified object is a Size structure with the same dimensions as this Size structure.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns a hash code for this Size structure.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticRound(SizeF)

Converts the specified SizeF structure to a Size structure by rounding the values of the SizeF structure to the nearest integer values.

System_CAPS_pubmethodSystem_CAPS_staticSubtract(Size, Size)

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

System_CAPS_pubmethodToString()

Creates a human-readable string that represents this Size structure.(Overrides ValueType.ToString().)

System_CAPS_pubmethodSystem_CAPS_staticTruncate(SizeF)

Converts the specified SizeF structure to a Size structure by truncating the values of the SizeF structure to the next lower integer values.

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticEmpty

Gets a Size structure that has a Height and Width value of 0.

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(Size, Size)

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

System_CAPS_puboperatorSystem_CAPS_staticEquality(Size, Size)

Tests whether two Size structures are equal.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Size to Point)

Converts the specified Size structure to a Point structure.

System_CAPS_puboperatorSystem_CAPS_staticImplicit(Size to SizeF)

Converts the specified Size structure to a SizeF structure.

System_CAPS_puboperatorSystem_CAPS_staticInequality(Size, Size)

Tests whether two Size structures are different.

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(Size, Size)

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

The Size class is used to specify a height and width through the Size property for Rectangle, RectangleF, Image, Icon and other graphics classes. You can perform operations on a Size by using the overloaded operators such as Addition, Subtraction, and Equality. The unit for the Height and Width of the Size structure depend on the PageUnit and PageScale settings for the Graphics object that is used to draw.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft