41 FXPoint(
const FXPoint& p):x(p.x),y(p.y){ }
42 FXPoint(FXshort xx,FXshort yy):x(xx),y(yy){ }
48 const FXshort&
operator[](FXint i)
const {
return (&x)[i];}
57 FXPoint&
set(FXshort xx,FXshort yy){ x=xx; y=yy;
return *
this; }
61 FXPoint& operator/=(FXshort c){ x/=c; y/=c;
return *
this; }
62 FXPoint& operator+=(
const FXPoint& p){ x+=p.x; y+=p.y;
return *
this; }
63 FXPoint& operator-=(
const FXPoint& p){ x-=p.x; y-=p.y;
return *
this; }
75 inline FXPoint operator*(
const FXPoint& p,FXshort c){
return FXPoint(p.x*c,p.y*c); }
76 inline FXPoint operator*(FXshort c,
const FXPoint& p){
return FXPoint(c*p.x,c*p.y); }
77 inline FXPoint operator/(
const FXPoint& p,FXshort c){
return FXPoint(p.x/c,p.y/c); }
78 inline FXPoint operator/(FXshort c,
const FXPoint& p){
return FXPoint(c/p.x,c/p.y); }
81 inline FXPoint operator+(
const FXPoint& a,
const FXPoint& b){
return FXPoint(a.x+b.x,a.y+b.y); }
82 inline FXPoint operator-(
const FXPoint& a,
const FXPoint& b){
return FXPoint(a.x-b.x,a.y-b.y); }
85 inline FXbool operator==(
const FXPoint& a,FXshort n){
return a.x==n && a.y==n; }
86 inline FXbool operator!=(
const FXPoint& a,FXshort n){
return a.x!=n || a.y!=n; }
87 inline FXbool operator==(FXshort n,
const FXPoint& a){
return n==a.x && n==a.y; }
88 inline FXbool operator!=(FXshort n,
const FXPoint& a){
return n!=a.x || n!=a.y; }
91 inline FXbool operator==(
const FXPoint& a,
const FXPoint& b){
return a.x==b.x && a.y==b.y; }
92 inline FXbool operator!=(
const FXPoint& a,
const FXPoint& b){
return a.x!=b.x || a.y!=b.y; }
95 inline FXbool operator<(
const FXPoint& a,FXshort n){
return a.x<n && a.y<n; }
96 inline FXbool operator<=(
const FXPoint& a,FXshort n){
return a.x<=n && a.y<=n; }
97 inline FXbool operator>(
const FXPoint& a,FXshort n){
return a.x>n && a.y>n; }
98 inline FXbool operator>=(
const FXPoint& a,FXshort n){
return a.x>=n && a.y>=n; }
101 inline FXbool operator<(FXshort n,
const FXPoint& a){
return n<a.x && n<a.y; }
102 inline FXbool operator<=(FXshort n,
const FXPoint& a){
return n<=a.x && n<=a.y; }
103 inline FXbool operator>(FXshort n,
const FXPoint& a){
return n>a.x && n>a.y; }
104 inline FXbool operator>=(FXshort n,
const FXPoint& a){
return n>=a.x && n>=a.y; }
107 inline FXbool operator<(
const FXPoint& a,
const FXPoint& b){
return a.x<b.x && a.y<b.y; }
108 inline FXbool operator<=(
const FXPoint& a,
const FXPoint& b){
return a.x<=b.x && a.y<=b.y; }
109 inline FXbool operator>(
const FXPoint& a,
const FXPoint& b){
return a.x>b.x && a.y>b.y; }
110 inline FXbool operator>=(
const FXPoint& a,
const FXPoint& b){
return a.x>=b.x && a.y>=b.y; }
113 inline FXPoint lo(
const FXPoint& a,
const FXPoint& b){
return FXPoint(Math::imin(a.x,b.x),Math::imin(a.y,b.y)); }
114 inline FXPoint hi(
const FXPoint& a,
const FXPoint& b){
return FXPoint(Math::imax(a.x,b.x),Math::imax(a.y,b.y)); }
117 extern FXAPI FXStream& operator<<(FXStream& store,
const FXPoint& p);
120 extern FXAPI FXStream& operator>>(FXStream& store,FXPoint& p);
FXPoint & operator=(const FXPoint &p)
Assignment.
Definition: FXPoint.h:51
FXPoint & operator*=(FXshort c)
Assignment operators.
Definition: FXPoint.h:60
Size.
Definition: FXSize.h:28
FXPoint()
Constructors.
Definition: FXPoint.h:39
Definition: FX4Splitter.h:28
FXPoint operator+() const
Unary.
Definition: FXPoint.h:69
Point.
Definition: FXPoint.h:32
FXbool operator!() const
Test if zero.
Definition: FXPoint.h:66
const FXshort & operator[](FXint i) const
Return a const reference to the ith element.
Definition: FXPoint.h:48
FXshort & operator[](FXint i)
Return a non-const reference to the ith element.
Definition: FXPoint.h:45