 |
OpendTect
6.6
|
Go to the documentation of this file.
14 #include "uibasemod.h"
28 :
Geom::Size2D<int>( a ) {}
30 :
Geom::Size2D<int>(wdt,hgt) {}
32 inline int hNrPics()
const {
return width_; }
33 inline int vNrPics()
const {
return height_; }
47 static inline bool isHor(
Side s ) {
return s >
Right; }
51 inline uiRect(
int l = 0 ,
int t = 0,
int r = 0 ,
int b = 0 );
55 inline uiSize getPixelSize()
const;
58 inline bool topToAtLeast(
int ref );
59 inline void topTo(
int ref );
60 inline bool bottomToAtLeast(
int ref );
61 inline void bottomTo(
int ref );
62 inline bool leftToAtLeast(
int ref );
63 inline void leftTo(
int ref );
65 inline bool rightToAtLeast(
int ref );
66 inline void expandTo(
const uiRect& oth );
67 inline int hNrPics()
const;
68 inline int vNrPics()
const;
69 inline void setHNrPics(
int np );
70 inline void setVNrPics(
int np );
82 : lt_(l,t), rb_(r,b) {}
84 {
return lt_ == b.
lt_ && rb_ == b.
rb_; }
86 {
return !(*
this == b); }
88 int left()
const {
return lt_.width(); }
89 int right()
const {
return rb_.width(); }
90 int top()
const {
return lt_.height(); }
91 int bottom()
const {
return rb_.height(); }
92 void setLeft(
int i ) { lt_.setWidth(i); }
94 void setTop(
int i ) { lt_.setHeight(i); }
104 inline uiRect getRect(
const uiSize&,
int extrapix=0)
const;
105 inline uiRect getRect(
const uiRect&,
int extrapix=0)
const;
107 { lt_ += b.
lt_; rb_ += b.
rb_;
return *
this; }
112 :
Geom::PixRectangle<int>( l, t, r, b )
117 :
Geom::PixRectangle<int>( tl, br )
122 :
Geom::PixRectangle<int>( tl, sz )
127 :
Geom::PixRectangle<int>( pr )
137 int hOffset = other.
left() -
left();
138 int vOffset = other.
top() -
top();
139 return uiRect( hOffset, vOffset,
146 int shift = ref -
top();
159 int shift = ref -
top();
167 int shift = ref -
bottom();
179 int shift = ref -
bottom();
187 int shift = ref -
left();
199 int shift = ref -
left();
207 int shift = ref -
right();
215 int shift = ref -
right();
261 #define mUIGeomImplSideFns(clss) \
262 inline int clss::get( uiRect::Side s ) const \
263 { return uiRect::isHor(s) ? (s == uiRect::Top ? top() : bottom()) \
264 : (s == uiRect::Left ? left() : right() ); } \
265 inline void clss::set( uiRect::Side s, int i ) \
266 { uiRect::isHor(s) ? (s == uiRect::Top ? setTop(i) : setBottom(i)) \
267 : (s == uiRect::Left ? setLeft(i) : setRight(i)); }
275 return uiPoint( relpt.x+lt_.width(), relpt.y+lt_.height());
300 #define mGoldenRatio 1.618034f
305 return inp > 0 ? (int)(val+.5f) : (int)(val - .5f);
312 return inp > 0 ? (int)(val+.5f) : (int)(val - .5f);
uiRect(int l=0, int t=0, int r=0, int b=0)
Definition: uigeom.h:111
void rightTo(int ref)
Definition: uigeom.h:205
void sortCorners(bool leftislow=true, bool topislow=true)
Definition: geometry.h:633
bool bottomToAtLeast(int ref)
Definition: uigeom.h:165
void setBottom(int val)
Definition: geometry.h:618
void setHNrPics(int np)
nr of pics should be > 0
Definition: uigeom.h:245
int GetGoldenMinor(int inp)
Definition: uigeom.h:309
static uiRect::Side across(uiRect::Side)
Definition: uigeom.h:254
@ Bottom
Definition: oduicommon.h:65
int bottom() const
Definition: geometry.h:598
mDeclareEnumUtils(Side) static inline bool isHor(Side s)
Definition: uigeom.h:46
#define mUIGeomImplSideFns(clss)
Definition: uigeom.h:261
void topTo(int ref)
Definition: uigeom.h:157
static uiRect::Side clockWise(uiRect::Side)
Definition: uigeom.h:257
Side
Definition: uigeom.h:45
void bottomTo(int ref)
Definition: uigeom.h:177
#define mExpClass(module)
Definition: commondefs.h:177
uiRect selectArea(const uiRect &other) const
Definition: uigeom.h:135
void setHNrPics(int np)
nr of pics should be > 0
Definition: uigeom.h:35
uiSize getPixelSize() const
Definition: uigeom.h:131
#define mMAX(x, y)
Definition: commondefs.h:61
void setRight(int val)
Definition: geometry.h:613
void setLeft(int val)
Definition: geometry.h:603
uiSize lt_
Definition: uigeom.h:99
int hNrPics() const
Definition: uigeom.h:238
uiBorder(int l, int t, int r, int b)
Definition: uigeom.h:81
int bottom() const
Definition: uigeom.h:91
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:81
T top() const
Definition: geometry.h:588
void setBottom(int i)
Definition: uigeom.h:95
@ Bottom
Definition: uigeom.h:45
int left() const
Definition: uigeom.h:88
void leftTo(int ref)
Definition: uigeom.h:197
int right() const
Definition: geometry.h:593
int hNrPics() const
Definition: uigeom.h:32
@ Right
Definition: uigeom.h:45
void setRight(int i)
Definition: uigeom.h:93
void expandTo(const uiRect &oth)
Definition: uigeom.h:226
void setVNrPics(int np)
nr of pics should be > 0
Definition: uigeom.h:250
uiSize(int wdt=0, int hgt=0)
Definition: uigeom.h:29
uiSize rb_
Definition: uigeom.h:100
@ rightTo
LeftTo/RightTo allow extra horizonal distance.
Definition: uilayout.h:21
int right() const
Definition: uigeom.h:89
uiSize(const Geom::Size2D< int > &a)
Definition: uigeom.h:27
T left() const
Definition: geometry.h:583
void setVNrPics(int np)
nr of pics should be > 0
Definition: uigeom.h:37
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:90
Point2D< int > bottomright_
Definition: geometry.h:182
bool rightToAtLeast(int ref)
Definition: uigeom.h:213
static const float cGoldenRatio
Definition: uigeom.h:308
@ leftTo
Definition: uilayout.h:21
#define mGoldenRatio
Definition: uigeom.h:300
uiPoint relPt(const uiPoint &drawpt) const
Definition: uigeom.h:279
void set(T &_to, const F &fr)
template based type conversion
Definition: convert.h:27
void setTop(int i)
Definition: uigeom.h:94
bool topToAtLeast(int ref)
Definition: uigeom.h:144
int top() const
Definition: uigeom.h:90
@ Left
Definition: uigeom.h:45
uiBorder(int i=0)
Definition: uigeom.h:80
Geom::Point2D< int > uiPoint
Definition: uigeom.h:19
T width() const
Definition: geometry.h:573
int GetGoldenMajor(int inp)
Definition: uigeom.h:302
T width() const
Definition: geometry.h:421
Definition: geometry.h:19
#define mMIN(x, y)
Definition: commondefs.h:62
@ Top
Definition: uigeom.h:45
T y
Definition: geometry.h:68
T x
Definition: geometry.h:67
T height() const
Definition: geometry.h:578
void setLeft(int i)
Definition: uigeom.h:92
Geom::Point2D< double > uiWorldPoint
Definition: uigeom.h:20
Geom::PosRectangle< double > uiWorldRect
Definition: uigeom.h:21
int vNrPics() const
Definition: uigeom.h:33
Point2D< int > topleft_
Definition: geometry.h:181
@ Right
Definition: oduicommon.h:64
uiRect getRect(const uiSize &, int extrapix=0) const
Definition: uigeom.h:285
@ Left
Definition: oduicommon.h:63
T height() const
Definition: geometry.h:426
bool leftToAtLeast(int ref)
Definition: uigeom.h:185
void setTop(int val)
Definition: geometry.h:608
int vNrPics() const
Definition: uigeom.h:241
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021