Size Class

Summary: Represents size.

Module: aspose.imaging

Full Name: aspose.imaging.Size

Constructors

NameDescription
Size()Initializes a new instance of the Size class
Size(point)Initializes a new instance of the Size structure from the specified Point.
Size(width, height)Initializes a new instance of the Size structure from the specified dimensions.

Properties

NameTypeAccessDescription
empty [static]SizerGets a new instance of the Size structure that has Size.width and Size.height values set to zero.
heightintr/wGets or sets the vertical component of this Size.
is_emptyboolrGets a value indicating whether this Size has width and height of 0.
widthintr/wGets or sets the horizontal component of this Size.

Methods

NameDescription
add(size1, size2)Adds the width and height of one Size structure to the width and height of another Size structure.
ceiling(size)Converts the specified SizeF structure to a Size structure by rounding the values of the Size structure to the next higher integer values.
round(size)Converts the specified SizeF structure to a Size structure by rounding the values of the SizeF structure to the nearest integer values.
subtract(size1, size2)Subtracts the width and height of one Size structure from the width and height of another Size structure.
truncate(size)Converts the specified SizeF structure to a Size structure by truncating the values of the SizeF structure to the next lower integer values.

Constructor: Size()

 Size() 

Initializes a new instance of the Size class

Constructor: Size(point)

 Size(point) 

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

Parameters:

ParameterTypeDescription
pointPointThe Point from which to initialize this Size.

Constructor: Size(width, height)

 Size(width, height) 

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

Parameters:

ParameterTypeDescription
widthintThe width component of the new Size.
heightintThe height component of the new Size.

Method: add(size1, size2) [static]

 add(size1, size2) 

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

Parameters:

ParameterTypeDescription
size1SizeThe first Size to add.
size2SizeThe second Size to add.

Returns

TypeDescription
SizeA Size structure that is the result of the addition operation.

Method: ceiling(size) [static]

 ceiling(size) 

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

Parameters:

ParameterTypeDescription
sizeSizeFThe SizeF structure to convert.

Returns

TypeDescription
SizeThe Size structure this method converts to.

Method: round(size) [static]

 round(size) 

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

Parameters:

ParameterTypeDescription
sizeSizeFThe SizeF structure to convert.

Returns

TypeDescription
SizeThe Size structure this method converts to.

Method: subtract(size1, size2) [static]

 subtract(size1, size2) 

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

Parameters:

ParameterTypeDescription
size1SizeThe Size structure on the left side of the subtraction operator.
size2SizeThe Size structure on the right side of the subtraction operator.

Returns

TypeDescription
SizeThe Size that is a result of the subtraction operation.

Method: truncate(size) [static]

 truncate(size) 

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

Parameters:

ParameterTypeDescription
sizeSizeFThe SizeF structure to convert.

Returns

TypeDescription
SizeThe Size structure this method converts to.