Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
Public Fields | |
| static const point | empty |
| Represents a xtd::drawing::point that has xtd::drawing::point::x and xtd::drawing::point::y values set to zero. | |
Public Properties | |
| int32 | x |
| Gets or sets the x-coordinate of this xtd::drawing::point. | |
| int32 | y |
| Gets or sets the y-coordinate of this xtd::drawing::point. | |
| bool | is_empty () const noexcept |
| Gets a value indicating whether this xtd::drawing::point is empty. | |
Public Constructors | |
| point () noexcept=default | |
| Initializes a new instance of the xtd::drawing::point class. | |
| point (int32 dw) noexcept | |
| Initializes a new instance of the xtd::drawing::point class using coordinates specified by an integer value. | |
| point (int32 x, int32 y) noexcept | |
| Initializes a new instance of the xtd::drawing::point class with the specified coordinates. | |
| point (const size &sz) noexcept | |
| Initializes a new instance of the xtd::drawing::point class from a xtd::drawing::size. | |
Public Methods | |
| bool | equals (const xtd::object &obj) const noexcept override |
| Determines whether the specified object is equal to the current object. | |
| bool | equals (const point &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. | |
| void | offset (int32 dx, int32 dy) noexcept |
| Translates this xtd::drawing::point by the specified amount. | |
| void | offset (const point &p) noexcept |
| Translates this xtd::drawing::point by the specified xtd::drawing::point. | |
| xtd::string | to_string () const noexcept override |
| Converts this point to a human-readable string. | |
| static point | truncate (const point_f &value) noexcept |
| Converts the specified xtd::drawing::point_f to a point by truncating the values of the xtd::drawing::point_f. | |
| static point | add (const point &pt, const size &sz) noexcept |
| Adds the specified xtd::drawing::size to the specified xtd::drawing::point. | |
| static point | add (const point &pt1, const point &pt2) noexcept |
| Adds the specified xtd::drawing::point to the specified xtd::drawing::point. | |
| static point | ceiling (const point_f &value) noexcept |
| Converts the specified xtd::drawing::point_f to a point by rounding the values of the xtd::drawing::point_f to the next higher integer values. | |
| static point | round (const point_f &value) noexcept |
| Converts the specified xtd::drawing::point_f to a point object by rounding the xtd::drawing::point_f values to the nearest integer. | |
| static point | subtract (const point &pt, const size &sz) noexcept |
| Returns the result of subtracting specified xtd::drawing::size from the specified xtd::drawing::point. | |
| static point | subtract (const point &pt1, const point &pt2) noexcept |
| Returns the result of subtracting specified xtd::drawing::point from the specified xtd::drawing::point. | |
Operators | |
| point | operator+ (const size &sz) const noexcept |
| Translates a xtd::drawing::point by a given xtd::drawing::size. | |
| point | operator+ (const point &pt) const noexcept |
| Translates a xtd::drawing::point by a given xtd::drawing::point. | |
| point & | operator+= (const size &sz) noexcept |
| Translates a xtd::drawing::point by a given xtd::drawing::size. | |
| point & | operator+= (const point &pt) noexcept |
| Translates a xtd::drawing::point by a given xtd::drawing::point. | |
| point | operator- (const size &sz) const noexcept |
| Translates a xtd::drawing::point by the negative of a given xtd::drawing::size. | |
| point | operator- (const point &pt) const noexcept |
| Translates a xtd::drawing::point by the negative of a given xtd::drawing::point. | |
| point & | operator-= (const size &sz) noexcept |
| Translates a xtd::drawing::point by the negative of a given xtd::drawing::size. | |
| point & | operator-= (const point &pt) noexcept |
| Translates a xtd::drawing::point by the negative of a given xtd::drawing::point. | |
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 bool | equals (const point &) 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 xtd::drawing::point class.
|
explicitnoexcept |
Initializes a new instance of the xtd::drawing::point class using coordinates specified by an integer value.
| dx | A 32-bit integer that specifies the coordinates for the new xtd::drawing::point. |
Initializes a new instance of the xtd::drawing::point class with the specified coordinates.
| x | The horizontal position of the point. |
| y | The vertical position of the point. |
|
explicitnoexcept |
Initializes a new instance of the xtd::drawing::point class from a xtd::drawing::size.
| sz | A size that specifies the coordinates for the new point. |
|
noexcept |
Gets a value indicating whether this xtd::drawing::point is empty.
true if both xtd::drawing::point::x and xtd::drawing::point::y are 0; otherwise, false.
|
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.
Translates this xtd::drawing::point by the specified amount.
| dx | The amount to offset the x-coordinate. |
| dy | The amount to offset the y-coordinate. |
|
noexcept |
Translates this xtd::drawing::point by the specified xtd::drawing::point.
| p | The xtd::drawing::point used offset this xtd::drawing::point. |
|
overridevirtualnoexcept |
Converts this point to a human-readable string.
Reimplemented from xtd::object.
Converts the specified xtd::drawing::point_f to a point by truncating the values of the xtd::drawing::point_f.
| value | The xtd::drawing::point_f to convert. |
Adds the specified xtd::drawing::size to the specified xtd::drawing::point.
| pt | The xtd::drawing::point to add. |
| sz | The xtd::drawing::size to add. |
Adds the specified xtd::drawing::point to the specified xtd::drawing::point.
| pt1 | The xtd::drawing::point to add. |
| pt2 | The xtd::drawing::point to add. |
Converts the specified xtd::drawing::point_f to a point by rounding the values of the xtd::drawing::point_f to the next higher integer values.
| value | The xtd::drawing::point_f to convert. |
Converts the specified xtd::drawing::point_f to a point object by rounding the xtd::drawing::point_f values to the nearest integer.
| value | The xtd::drawing::point_f to convert. |
Returns the result of subtracting specified xtd::drawing::size from the specified xtd::drawing::point.
| pt | The xtd::drawing::point to be subtracted from. |
| sz | The xtd::drawing::size to subtract from the xtd::drawing::point. |
Returns the result of subtracting specified xtd::drawing::point from the specified xtd::drawing::point.
| pt1 | The xtd::drawing::point to be subtracted from. |
| pt2 | The xtd::drawing::point to subtract from the xtd::drawing::point. |
Translates a xtd::drawing::point by a given xtd::drawing::size.
| sz | A xtd::drawing::size that specifies the pair of numbers to add to the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by a given xtd::drawing::point.
| pt | A xtd::drawing::point that specifies the pair of numbers to add to the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by a given xtd::drawing::size.
| sz | A xtd::drawing::size that specifies the pair of numbers to add to the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by a given xtd::drawing::point.
| pt | A xtd::drawing::point that specifies the pair of numbers to add to the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by the negative of a given xtd::drawing::size.
| sz | A xtd::drawing::size that specifies the pair of numbers to subtract from the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by the negative of a given xtd::drawing::point.
| pt | A xtd::drawing::point that specifies the pair of numbers to subtract from the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by the negative of a given xtd::drawing::size.
| sz | A xtd::drawing::size that specifies the pair of numbers to subtract from the coordinates of this xtd::drawing::point. |
Translates a xtd::drawing::point by the negative of a given xtd::drawing::point.
| pt | A xtd::drawing::point that specifies the pair of numbers to subtract from the coordinates of this xtd::drawing::point. |
|
static |
Represents a xtd::drawing::point that has xtd::drawing::point::x and xtd::drawing::point::y values set to zero.
| int32 xtd::drawing::point::x |
Gets or sets the x-coordinate of this xtd::drawing::point.
| x | The x-coordinate of this xtd::drawing::point. |
| int32 xtd::drawing::point::y |
Gets or sets the y-coordinate of this xtd::drawing::point.
| y | The y-coordinate of this xtd::drawing::point. |