49 FXRectangle(
const FXPoint& topleft,
const FXPoint& bottomright):x(topleft.x),y(topleft.y),w(bottomright.x-topleft.x+1),h(bottomright.y-topleft.y+1){ }
52 bool empty()
const {
return w<=0 || h<=0; }
55 bool operator!()
const {
return x==0 && y==0 && w==0 && h==0; }
124 extern FXAPI FXStream&
operator<<(FXStream& store,
const FXRectangle& r);
FXPoint br() const
Definition: FXRectangle.h:89
FXStream & operator>>(FXStream &store, FXDate &d)
FXPoint bl() const
Definition: FXRectangle.h:88
FXRectangle & set(const FXPoint &p, const FXSize &s)
Set from point and size.
Definition: FXRectangle.h:98
FXRectangle & set(const FXRectangle &r)
Set value from another rectangle.
Definition: FXRectangle.h:95
FXshort x
Definition: FXRectangle.h:39
Rectangle.
Definition: FXRectangle.h:37
short FXshort
Definition: fxdefs.h:395
FXRectangle & move(const FXPoint &p)
Return moved rectangle.
Definition: FXRectangle.h:72
FXRectangle & operator=(const FXRectangle &r)
Assignment.
Definition: FXRectangle.h:92
Size.
Definition: FXSize.h:32
FXRectangle & set(const FXPoint &topleft, const FXPoint &bottomright)
Set from corners.
Definition: FXRectangle.h:101
FXshort h
Definition: FXRectangle.h:42
#define FXAPI
Definition: fxdefs.h:122
FXPoint tl() const
Corners.
Definition: FXRectangle.h:86
FXshort h
Definition: FXSize.h:35
bool operator!=(const FXRectangle &r) const
Definition: FXRectangle.h:59
FXRectangle()
Constructors.
Definition: FXRectangle.h:46
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:99
FXshort y
Definition: FXPoint.h:38
FXshort x
Definition: FXPoint.h:37
FXDate operator+(const FXDate &d, FXint x)
Definition: FXDate.h:148
bool overlap(const FXExtentd &a, const FXExtentd &b)
bool operator==(const FXRectangle &r) const
Equality.
Definition: FXRectangle.h:58
FXshort y
Definition: FXRectangle.h:40
bool empty() const
Test if empty.
Definition: FXRectangle.h:52
bool contains(const FXRectangle &r) const
Rectangle properly contained in rectangle.
Definition: FXRectangle.h:66
Point.
Definition: FXPoint.h:35
FXRectangle & move(FXshort dx, FXshort dy)
Definition: FXRectangle.h:73
bool operator!() const
Test if zero.
Definition: FXRectangle.h:55
FXStream & operator<<(FXStream &store, const FXDate &d)
FXPoint tr() const
Definition: FXRectangle.h:87
FXRectangle(const FXPoint &p, const FXSize &s)
Definition: FXRectangle.h:48
FXshort w
Definition: FXRectangle.h:41
FXRectangle(FXshort xx, FXshort yy, FXshort ww, FXshort hh)
Definition: FXRectangle.h:47
bool contains(FXshort xx, FXshort yy) const
Definition: FXRectangle.h:63
FXshort w
Definition: FXSize.h:34
FXMat3d operator*(FXdouble x, const FXMat3d &a)
FXRectangle & set(FXshort xx, FXshort yy, FXshort ww, FXshort hh)
Set value from components.
Definition: FXRectangle.h:104
FXRectangle(const FXPoint &topleft, const FXPoint &bottomright)
Definition: FXRectangle.h:49
bool contains(const FXPoint &p) const
Point in rectangle.
Definition: FXRectangle.h:62