Stores an ordered pair of integers, which specify a height and width.
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. More... | |
Constructors | |
size ()=default | |
Initializes a new instance of the xtd::drawing::size class that has a Height and Width value of 0. More... | |
size (const xtd::drawing::point &point) noexcept | |
Initializes a new instance of the xtd::drawing::size class from the specified xtd::drawing::point class. More... | |
size (int32 width, int32 height) noexcept | |
Initializes a new instance of the xtd::drawing::size class from the specified dimensions. More... | |
Properties | |
int32 | height () const noexcept |
Gets he vertical component of this xtd::drawing::size class. More... | |
void | height (int32 value) noexcept |
Sets the vertical component of this xtd::drawing::size class. More... | |
bool | is_empty () const noexcept |
Tests whether this xtd::drawing::size class has xtd::drawing::size_fwidth and xtd::drawing::size_fheight of 0. More... | |
int32 | width () const noexcept |
Gets the horizontal component of this xtd::drawing::size class. More... | |
void | width (int32 value) noexcept |
Sets the horizontal component of this xtd::drawing::size class. More... | |
Methods | |
bool | equals (const xtd::drawing::size &value) const noexcept override |
xtd::ustring | to_string () const noexcept override |
Creates a human-readable string that represents this xtd::drawing::size class. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Operators | |
size | operator+ (const xtd::drawing::size &size) const noexcept |
Increases a xtd::drawing::size with a given xtd::drawing::size. More... | |
size & | operator+= (const xtd::drawing::size &size) noexcept |
Increases a xtd::drawing::size wuth a given xtd::drawing::size. More... | |
size | operator- (const xtd::drawing::size &size) const noexcept |
Decreases a xtd::drawing::size with the a given xtd::drawing::size. More... | |
size & | operator-= (const xtd::drawing::size &size) noexcept |
Decreases a xtd::drawing::size with the a given xtd::drawing::size. More... | |
Additional Inherited Members | |
![]() | |
object ()=default | |
Create a new instance of the ultimate base class object. More... | |
bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. More... | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. More... | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. More... | |
template<typename object_t > | |
std::unique_ptr< object_t > | memberwise_clone () const noexcept |
Creates a shallow copy of the current object. More... | |
![]() | |
virtual bool | equals (const size &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. More... | |
![]() | |
static bool | equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are considered equal. More... | |
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
Determines whether the specified object instances are the same instance. More... | |
|
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. |
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. |
|
noexcept |
Gets he vertical component of this xtd::drawing::size class.
|
noexcept |
Sets the vertical component of this xtd::drawing::size class.
value | The vertical component of this xtd::drawing::size class, typically measured in pixels. |
|
noexcept |
Tests whether this xtd::drawing::size class has xtd::drawing::size_fwidth and xtd::drawing::size_fheight of 0.
|
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. |
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. |
|
overridevirtualnoexcept |
Creates a human-readable string that represents this xtd::drawing::size class.
Reimplemented from xtd::object.
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 |
Gets the horizontal component of this xtd::drawing::size class.
|
noexcept |
Sets the horizontal component of this xtd::drawing::size class.
value | The horizontal component of this xtd::drawing::size class, typically measured in pixels. |
|
static |
Gets a xtd::drawing::size class that has a Height and Width value of 0. This field is constant.