Stores an ordered pair of integers, which specify a height and width.
Public Fields | |
| static const xtd::drawing::size | empty |
| Gets a xtd::drawing::size class that has a Height and Width value of 0. This field is constant. | |
Public Properties | |
| int32 | width |
| Gets or sets the horizontal component of this xtd::drawing::size class. | |
| int32 | height |
| Gets or sets he vertical component of this xtd::drawing::size class. | |
| bool | is_empty () const noexcept |
| Tests whether this xtd::drawing::size class has xtd::drawing::size_fwidth and xtd::drawing::size_fheight of 0. | |
Public Constructors | |
| size ()=default | |
| Initializes a new instance of the xtd::drawing::size class that has a Height and Width value of 0. | |
| size (const xtd::drawing::point &point) noexcept | |
| Initializes a new instance of the xtd::drawing::size class from the specified xtd::drawing::point class. | |
| size (int32 width, int32 height) noexcept | |
| Initializes a new instance of the xtd::drawing::size class from the specified dimensions. | |
Public Methods | |
| int32 | compare_to (const xtd::drawing::size &obj) const noexcept override |
| Compares the current instance with another object of the same type. | |
| bool | equals (const xtd::object &obj) const noexcept override |
| Determines whether the specified object is equal to the current object. | |
| bool | equals (const xtd::drawing::size &other) const noexcept override |
| Determines whether the specified object is equal to the current object. | |
| xtd::size | get_hash_code () const noexcept override |
| Serves as a hash function for a particular type. | |
| xtd::string | to_string () const noexcept override |
| Creates a human-readable string that represents this xtd::drawing::size class. | |
| static size | add (const size &size1, const size &size2) noexcept |
| Adds the width and height of one xtd::drawing::size class to the width and height of another size class. | |
| static size | ceiling (const size_f &value) noexcept |
| Converts the specified xtd::drawing::size_f to a xtd::drawing::size by rounding the values of the xtd::drawing::size_f to the next higher integer values. | |
| static size | round (const size_f &value) noexcept |
| Converts the specified xtd::drawing::size_f to a xtd::drawing::size object by rounding the xtd::drawing::size_f values to the nearest integer. | |
| static xtd::drawing::size | subtract (const xtd::drawing::size &sz1, const xtd::drawing::size &sz2) noexcept |
| Returns the result of subtracting specified xtd::drawing::size from the specified xtd::drawing::size. | |
| static size | truncate (const size_f &value) noexcept |
| Converts the specified xtd::drawing::size_f to a xtd::drawing::size by truncating the values of the xtd::drawing::size_f. | |
Operators | |
| size | operator+ (const xtd::drawing::size &size) const noexcept |
| Increases a xtd::drawing::size with a given xtd::drawing::size. | |
| size & | operator+= (const xtd::drawing::size &size) noexcept |
| Increases a xtd::drawing::size wuth a given xtd::drawing::size. | |
| size | operator- (const xtd::drawing::size &size) const noexcept |
| Decreases a xtd::drawing::size with the a given xtd::drawing::size. | |
| size & | operator-= (const xtd::drawing::size &size) noexcept |
| Decreases a xtd::drawing::size with the a given xtd::drawing::size. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. | |
| template<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| virtual int32 | compare_to (const size &obj) const noexcept=0 |
| Compares the current instance with another object of the same type. | |
| virtual bool | equals (const size &) const noexcept=0 |
| Indicates whether the current object is equal to another object of the same type. | |
| template<class object_a_t, class object_b_t> | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal. | |
| template<class object_a_t, class object_b_t> | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance. | |
|
default |
Initializes a new instance of the xtd::drawing::size class that has a Height and Width value of 0.
|
explicitnoexcept |
Initializes a new instance of the xtd::drawing::size class from the specified xtd::drawing::point class.
| point | The xtd::drawing::point class from which to initialize this xtd::drawing::size class |
Initializes a new instance of the xtd::drawing::size class from the specified dimensions.
| width | The width component of the new xtd::drawing::size. |
| height | The height component of the new xtd::drawing::size. |
|
noexcept |
Tests whether this xtd::drawing::size class has xtd::drawing::size_fwidth and xtd::drawing::size_fheight of 0.
true when this xtd::drawing::size class has both a xtd::drawing::size::width and xtd::drawing::size::height of 0; otherwise, false.
|
overridenoexcept |
Compares the current instance with another object of the same type.
| obj | An object to compare with this instance. |
| Value | Condition |
|---|---|
| Less than zero | This instance is less than obj. |
| Zero | This instance is equal to obj. |
| Greater than zero | This instance is greater than obj. |
|
overridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
true if the specified object is equal to the current object. otherwise, false. Reimplemented from xtd::object.
|
overridenoexcept |
Determines whether the specified object is equal to the current object.
| other | The object to compare with the current object. |
true if the specified object is equal to the current object. otherwise, false.
|
overridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
overridevirtualnoexcept |
Creates a human-readable string that represents this xtd::drawing::size class.
Reimplemented from xtd::object.
Adds the width and height of one xtd::drawing::size class to the width and height of another size class.
| size1 | The first xtd::drawing::size class to add. |
| size2 | The second xtd::drawing::size class to add. |
Converts the specified xtd::drawing::size_f to a xtd::drawing::size by rounding the values of the xtd::drawing::size_f to the next higher integer values.
| value | The xtd::drawing::size_f to convert. |
Converts the specified xtd::drawing::size_f to a xtd::drawing::size object by rounding the xtd::drawing::size_f values to the nearest integer.
| value | The xtd::drawing::size_f to convert. |
|
staticnoexcept |
Returns the result of subtracting specified xtd::drawing::size from the specified xtd::drawing::size.
| sz1 | The xtd::drawing::size to be subtracted from. |
| sz2 | The xtd::drawing::size to subtract from the xtd::drawing::size. |
Converts the specified xtd::drawing::size_f to a xtd::drawing::size by truncating the values of the xtd::drawing::size_f.
| value | The xtd::drawing::size_f to convert. |
|
noexcept |
Increases a xtd::drawing::size with a given xtd::drawing::size.
| size | A xtd::drawing::size that specifies the pair of numbers to add to the size of this xtd::drawing::size. |
|
noexcept |
Increases a xtd::drawing::size wuth a given xtd::drawing::size.
| size | A xtd::drawing::size that specifies the pair of numbers to add to the size of this xtd::drawing::size. |
|
noexcept |
Decreases a xtd::drawing::size with the a given xtd::drawing::size.
| size | A xtd::drawing::size that specifies the pair of numbers to subtract from the size of this xtd::drawing::size. |
|
noexcept |
Decreases a xtd::drawing::size with the a given xtd::drawing::size.
| size | A xtd::drawing::size that specifies the pair of numbers to subtract from the size of this xtd::drawing::size. |
|
static |
Gets a xtd::drawing::size class that has a Height and Width value of 0. This field is constant.
| int32 xtd::drawing::size::width |
Gets or sets the horizontal component of this xtd::drawing::size class.
| width | The horizontal component of this xtd::drawing::size class, typically measured in pixels. |
| int32 xtd::drawing::size::height |
Gets or sets he vertical component of this xtd::drawing::size class.
| height | The vertical component of this xtd::drawing::size class, typically measured in pixels. |