23 #ifndef BAGEL_BOFLIB_POINT_H 24 #define BAGEL_BOFLIB_POINT_H 26 #include "common/rect.h" 27 #include "bagel/boflib/stdinc.h" 28 #include "bagel/boflib/object.h" 44 setWinPoint(&stPoint);
47 void setWinPoint(
const POINT *pPoint);
48 POINT GetWinPoint()
const;
50 void operator=(
const POINT &stPoint) {
51 setWinPoint(&stPoint);
54 operator const POINT() {
60 void offset(
int xOffset,
int yOffset);
63 void operator=(
const StPoint &point);
65 bool operator==(
StPoint point)
const;
66 bool operator!=(
StPoint point)
const;
67 void operator+=(
StSize size);
68 void operator-=(
StSize size);
81 inline CBofPoint::CBofPoint() {
86 inline CBofPoint::CBofPoint(
const int initX,
const int initY) {
91 inline CBofPoint::CBofPoint(
const StPoint stPoint) {
96 inline CBofPoint::CBofPoint(
const StSize &stSize) {
101 inline CBofPoint::CBofPoint(
const CBofPoint &cPoint) {
106 inline void CBofPoint::setWinPoint(
const POINT *pPoint) {
107 assert(pPoint !=
nullptr);
108 assert(isValidObject(
this));
114 inline POINT CBofPoint::GetWinPoint()
const {
115 assert(isValidObject(
this));
125 inline void CBofPoint::offset(
int xOffset,
int yOffset) {
127 assert(isValidObject(
this));
133 inline void CBofPoint::offset(
StPoint point) {
135 assert(isValidObject(
this));
141 inline void CBofPoint::offset(
StSize size) {
143 assert(isValidObject(
this));
149 inline void CBofPoint::operator=(
const StPoint &point) {
151 assert(isValidObject(
this));
157 inline void CBofPoint::operator=(
const CBofPoint &point) {
159 assert(isValidObject(
this));
165 inline bool CBofPoint::operator==(
StPoint point)
const {
167 assert(isValidObject(
this));
169 return (x == point.x && y == point.y);
172 inline bool CBofPoint::operator!=(
StPoint point)
const {
174 assert(isValidObject(
this));
176 return (x != point.x || y != point.y);
179 inline void CBofPoint::operator+=(
StSize size) {
181 assert(isValidObject(
this));
187 inline void CBofPoint::operator+=(
StPoint point) {
189 assert(isValidObject(
this));
195 inline void CBofPoint::operator-=(
StPoint point) {
197 assert(isValidObject(
this));
203 inline void CBofPoint::operator-=(
StSize size) {
205 assert(isValidObject(
this));
213 assert(isValidObject(
this));
215 return CBofPoint(x + size.cx, y + size.cy);
220 assert(isValidObject(
this));
222 return CBofPoint(x + point.x, y + point.y);
227 assert(isValidObject(
this));
229 return CBofPoint(x - size.cx, y - size.cy);
234 assert(isValidObject(
this));
236 return CBofPoint(x - point.x, y - point.y);
239 inline CBofPoint CBofPoint::operator-()
const {
241 assert(isValidObject(
this));
246 #define CPoint CBofPoint
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47