Size Structure

Stores an ordered pair of integers, typically the width and height of a rectangle.

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.9.0.0 (20.9.0)
Syntax
C#
public struct Size

The Size type exposes the following members.

Constructors
  NameDescription
Public methodSize(Point)
Initializes a new instance of the Size struct from the specified Point.
Public methodSize(Int32, Int32)
Initializes a new instance of the Size struct from the specified dimensions.
Properties
  NameDescription
Public propertyHeight
Gets or sets the vertical component of this Size.
Public propertyIsEmpty
Gets a value indicating whether this Size has width and height of 0.
Public propertyWidth
Gets or sets the horizontal component of this Size.
Methods
  NameDescription
Public methodStatic memberAdd
Adds the width and height of one Size structure to the width and height of another Size structure.
Public methodStatic memberCeiling
Converts the specified SizeF structure to a Size structure by rounding the values of the Size structure to the next higher integer values.
Public methodEquals
Tests to see whether the specified object is a Size with the same dimensions as this Size.
(Overrides ValueTypeEquals(Object).)
Public methodGetHashCode
Returns a hash code for this Size structure.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberRound
Converts the specified SizeF structure to a Size structure by rounding the values of the SizeF structure to the nearest integer values.
Public methodStatic memberSubtract
Subtracts the width and height of one Size structure from the width and height of another Size structure.
Public methodToString
Creates a human-readable string that represents this Size.
(Overrides ValueTypeToString.)
Public methodStatic memberTruncate
Converts the specified SizeF structure to a Size structure by truncating the values of the SizeF structure to the next lower integer values.
Operators
  NameDescription
Public operatorStatic memberAddition
Adds the width and height of one Size structure to the width and height of another Size structure.
Public operatorStatic memberEquality
Tests whether two Size structures are equal.
Public operatorStatic member(Size to Point)
Converts the specified Size to a Point.
Public operatorStatic member(Size to SizeF)
Converts the specified Size to a SizeF.
Public operatorStatic memberInequality
Tests whether two Size structures are different.
Public operatorStatic memberSubtraction
Subtracts the width and height of one Size structure from the width and height of another Size structure.
Fields
  NameDescription
Public fieldStatic memberEmpty
Gets a Size structure that has a Height and Width value of 0.
See Also