Stores an ordered pair of floating-point, which specify a height and width.
Public Fields | |
| static const xtd::drawing::size_f | empty |
| Gets a Size class that has a Height and Width value of 0. This field is constant. | |
Public Properties | |
| float | width |
| Gets or sets the horizontal component of this xtd::drawing::size_f class. | |
| float | height |
| Gets or sets he vertical component of this xtd::drawing::size_f class. | |
| bool | is_empty () const noexcept |
| Tests whether this Size class has xtd::drawing::size_f::width and xtd::drawing::size_f::height of 0. | |
Public Constructors | |
| size_f () noexcept=default | |
| Initializes a new instance of the Size class that has a Height and Width value of 0. | |
| size_f (const xtd::drawing::point_f &point) noexcept | |
| Initializes a new instance of the xtd::drawing::size_f class from the specified xtd::drawing::point_f class. | |
| size_f (float width, float height) noexcept | |
| Initializes a new instance of the xtd::drawing::size_f class from the specified dimensions. | |
Public Methods | |
| int32 | compare_to (const xtd::drawing::size_f &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_f &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_f class. | |
Public Static Methods | |
| static xtd::drawing::size_f | add (const xtd::drawing::size_f &size1, const xtd::drawing::size_f &size2) noexcept |
| Adds the width and height of one xtd::drawing::size_f class to the width and height of another xtd::drawing::size_f class. | |
| static xtd::drawing::size_f | subtract (const xtd::drawing::size_f &sz1, const xtd::drawing::size_f &sz2) noexcept |
| Returns the result of subtracting specified xtd::drawing::size_f from the specified xtd::drawing::size_f. | |
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_f &obj) const noexcept=0 |
| Compares the current instance with another object of the same type. | |
| virtual bool | equals (const size_f &) 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. | |
|
defaultnoexcept |
Initializes a new instance of the Size class that has a Height and Width value of 0.
|
explicitnoexcept |
Initializes a new instance of the xtd::drawing::size_f class from the specified xtd::drawing::point_f class.
| point | The xtd::drawing::point_f class from which to initialize this xtd::drawing::size_f class |
|
noexcept |
Initializes a new instance of the xtd::drawing::size_f class from the specified dimensions.
| width | The width component of the new xtd::drawing::size_f. |
| height | The height component of the new xtd::drawing::size_f. |
|
noexcept |
Tests whether this Size class has xtd::drawing::size_f::width and xtd::drawing::size_f::height of 0.
true when this xtd::drawing::size_f class has both a xtd::drawing::size_fwidth and xtd::drawing::size_fheight 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_f class.
Reimplemented from xtd::object.
|
staticnoexcept |
Adds the width and height of one xtd::drawing::size_f class to the width and height of another xtd::drawing::size_f class.
| size1 | The first xtd::drawing::size_f class to add. |
| size2 | The second xtd::drawing::size_f class to add. |
|
staticnoexcept |
Returns the result of subtracting specified xtd::drawing::size_f from the specified xtd::drawing::size_f.
| sz1 | The xtd::drawing::size_f to be subtracted from. |
| sz2 | The xtd::drawing::size_f to subtract from the Size. |
|
noexcept |
Increases a xtd::drawing::size_f with a given xtd::drawing::size_f.
| size | A xtd::drawing::size_f that specifies the pair of numbers to add to the size of this xtd::drawing::size_f. |
|
noexcept |
Increases a xtd::drawing::size_f 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_f. |
|
noexcept |
Increases a xtd::drawing::size_f wuth a given xtd::drawing::size_f.
| size | A xtd::drawing::size_f that specifies the pair of numbers to add to the size of this xtd::drawing::size_f. |
|
noexcept |
Increases a xtd::drawing::size_f 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_f. |
|
noexcept |
Decreases a xtd::drawing::size_f with the a given xtd::drawing::size_f.
| size | A xtd::drawing::size_f that specifies the pair of numbers to subtract from the size of this xtd::drawing::size_f. |
|
noexcept |
Decreases a xtd::drawing::size_f 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_f. |
|
noexcept |
Decreases a xtd::drawing::size_f with the a given xtd::drawing::size_f.
| size | A xtd::drawing::size_f that specifies the pair of numbers to subtract from the size of this xtd::drawing::size_f. |
|
noexcept |
Decreases a xtd::drawing::size_f 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_f. |
|
static |
Gets a Size class that has a Height and Width value of 0. This field is constant.
| float xtd::drawing::size_f::width |
Gets or sets the horizontal component of this xtd::drawing::size_f class.
| width | The horizontal component of this xtd::drawing::size_f class, typically measured in pixels. |
| float xtd::drawing::size_f::height |
Gets or sets he vertical component of this xtd::drawing::size_f class.
| height | The vertical component of this xtd::drawing::size_f class, typically measured in pixels. |