#include <wx/gdicmn.h>
A wxPoint is a useful data structure for graphics operations.
It contains integer x and y members. See wxRealPoint for a floating point version.
Note that the width and height stored inside a wxPoint object may be negative and that wxPoint functions do not perform any check against negative values (this is used to e.g. store the special -1 value in wxDefaultPosition instance).
Predefined objects/pointers: wxDefaultPosition
Public Member Functions | |
wxPoint () | |
Constructs a point. | |
wxPoint (int x, int y) | |
Initializes the point object with the given x and y coordinates. | |
Miscellaneous operators | |
wxPoint & | operator= (const wxPoint &pt) |
bool | operator== (const wxPoint &p1, const wxPoint &p2) |
bool | operator!= (const wxPoint &p1, const wxPoint &p2) |
wxPoint | operator+ (const wxPoint &p1, const wxPoint &p2) |
wxPoint | operator- (const wxPoint &p1, const wxPoint &p2) |
wxPoint & | operator+= (const wxPoint &pt) |
wxPoint & | operator-= (const wxPoint &pt) |
wxPoint | operator+ (const wxPoint &pt, const wxSize &sz) |
wxPoint | operator- (const wxPoint &pt, const wxSize &sz) |
wxPoint | operator+ (const wxSize &sz, const wxPoint &pt) |
wxPoint | operator- (const wxSize &sz, const wxPoint &pt) |
wxPoint & | operator+= (const wxSize &sz) |
wxPoint & | operator-= (const wxSize &sz) |
Public Attributes | |
int | x |
x member. | |
int | y |
y member. |
wxPoint::wxPoint | ( | ) |
Constructs a point.
Initializes the internal x and y coordinates to zero.
wxPoint::wxPoint | ( | int | x, | |
int | y | |||
) |
Initializes the point object with the given x and y coordinates.
int wxPoint::x |
x member.
int wxPoint::y |
y member.
![]() |
[ top ] |