Size Class
Summary: Represents size.
Module: aspose.psd
Full Name: aspose.psd.Size
Aspose.PSD Version: 24.9.0
Constructors
Name | Description |
---|---|
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
Name | Type | Access | Description |
---|---|---|---|
empty [static] | Size | r | Gets a new instance of the Size structure that has Size.width and Size.height values set to zero. |
height | int | r/w | Gets or sets the vertical component of this Size. |
is_empty | bool | r | Gets a value indicating whether this Size has width and height of 0. |
width | int | r/w | Gets or sets the horizontal component of this Size. |
Methods
Name | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
point | Point | The 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:
Parameter | Type | Description |
---|---|---|
width | int | The width component of the new Size. |
height | int | The 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:
Parameter | Type | Description |
---|---|---|
size1 | Size | The first Size to add. |
size2 | Size | The second Size to add. |
Returns
Type | Description |
---|---|
Size | A 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:
Parameter | Type | Description |
---|---|---|
size | SizeF | The SizeF structure to convert. |
Returns
Type | Description |
---|---|
Size | The 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:
Parameter | Type | Description |
---|---|---|
size | SizeF | The SizeF structure to convert. |
Returns
Type | Description |
---|---|
Size | The 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:
Parameter | Type | Description |
---|---|---|
size1 | Size | The Size structure on the left side of the subtraction operator. |
size2 | Size | The Size structure on the right side of the subtraction operator. |
Returns
Type | Description |
---|---|
Size | The 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:
Parameter | Type | Description |
---|---|---|
size | SizeF | The SizeF structure to convert. |
Returns
Type | Description |
---|---|
Size | The Size structure this method converts to. |