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 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 Properties | |
bool | is_empty () const noexcept |
Gets a value indicating whether this xtd::drawing::point is empty. | |
int32 | x () const noexcept |
Gets the x-coordinate of this xtd::drawing::point. | |
void | x (int32 x) noexcept |
Sets the x-coordinate of this xtd::drawing::point. | |
int32 | y () const noexcept |
Gets the y-coordinate of this xtd::drawing::point. | |
void | y (int32 y) noexcept |
Sets the y-coordinate of this xtd::drawing::point. | |
Public Methods | |
bool | equals (const point &value) const noexcept override |
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. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
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. | |
template<typename object_a_t , typename 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. | |
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 | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
Public Member Functions inherited from xtd::iequatable< point > | |
virtual bool | equals (const point &) const noexcept=0 |
Indicates whether the current object is equal to another object of the same type. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename 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<typename object_a_t , typename 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.
|
noexcept |
Gets the x-coordinate of this xtd::drawing::point.
|
noexcept |
Sets the x-coordinate of this xtd::drawing::point.
x | The x-coordinate of this xtd::drawing::point. |
|
noexcept |
Gets the y-coordinate of this xtd::drawing::point.
|
noexcept |
Sets the y-coordinate of this xtd::drawing::point.
y | The x-coordinate of this xtd::drawing::point. |
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. |
|
virtualnoexcept |
Determines whether the specified object is equal to the current object.
obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
inlinestaticnoexcept |
Determines whether the specified object instances are considered equal.
object_a | The first object to compare. |
object_b | The second object to compare. |
|
static |
Represents a xtd::drawing::point that has xtd::drawing::point::x and xtd::drawing::point::y values set to zero.