Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-19 13:23:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-19 13:23:08 +0400
commit112b1a0779d0e570f8b6726b2d3deb4f45d784a5 (patch)
tree697b16d8d41fe0df37e14f509008bd19d7eedb80 /intern/ghost/GHOST_Rect.h
parent03ed173fe6a9d286faacc2e66c5c654cd571f18c (diff)
style cleanup: ghost headers
Diffstat (limited to 'intern/ghost/GHOST_Rect.h')
-rw-r--r--intern/ghost/GHOST_Rect.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h
index 30d9d16b701..90678c6dfa2 100644
--- a/intern/ghost/GHOST_Rect.h
+++ b/intern/ghost/GHOST_Rect.h
@@ -55,20 +55,23 @@ public:
* @param r requested right coordinate of the rectangle
* @param b requested bottom coordinate of the rectangle
*/
- GHOST_Rect(GHOST_TInt32 l=0, GHOST_TInt32 t=0, GHOST_TInt32 r=0, GHOST_TInt32 b=0)
- : m_l(l), m_t(t), m_r(r), m_b(b) {}
+ GHOST_Rect(GHOST_TInt32 l = 0, GHOST_TInt32 t = 0, GHOST_TInt32 r = 0, GHOST_TInt32 b = 0)
+ : m_l(l), m_t(t), m_r(r), m_b(b)
+ {}
/**
* Copy constructor.
* @param r rectangle to copy
*/
GHOST_Rect(const GHOST_Rect& r)
- : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b) {}
+ : m_l(r.m_l), m_t(r.m_t), m_r(r.m_r), m_b(r.m_b)
+ {}
/**
* Destructor.
*/
- virtual ~GHOST_Rect() {};
+ virtual ~GHOST_Rect()
+ {};
/**
* Access to rectangle width.
@@ -155,7 +158,7 @@ public:
* @param cx requested center x-coordinate of the rectangle
* @param cy requested center y-coordinate of the rectangle
*/
- virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy);
+ virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy);
/**
* Sets rectangle members.
@@ -166,7 +169,7 @@ public:
* @param w requested width of the rectangle
* @param h requested height of the rectangle
*/
- virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h);
+ virtual void setCenter(GHOST_TInt32 cx, GHOST_TInt32 cy, GHOST_TInt32 w, GHOST_TInt32 h);
/**
* Clips a rectangle.
@@ -175,7 +178,7 @@ public:
* @param r the rectangle to clip
* @return whether clipping has occurred
*/
- virtual bool clip(GHOST_Rect& r) const;
+ virtual bool clip(GHOST_Rect& r) const;
/** Left coordinate of the rectangle */
GHOST_TInt32 m_l;
@@ -209,7 +212,7 @@ inline void GHOST_Rect::set(GHOST_TInt32 l, GHOST_TInt32 t, GHOST_TInt32 r, GHOS
m_l = l; m_t = t; m_r = r; m_b = b;
}
-inline bool GHOST_Rect::isEmpty() const
+inline bool GHOST_Rect::isEmpty() const
{
return (getWidth() == 0) || (getHeight() == 0);
}
@@ -237,18 +240,18 @@ inline void GHOST_Rect::unionPoint(GHOST_TInt32 x, GHOST_TInt32 y)
#include <stdio.h>
inline void GHOST_Rect::wrapPoint(GHOST_TInt32 &x, GHOST_TInt32 &y, GHOST_TInt32 ofs)
{
- GHOST_TInt32 w= getWidth();
- GHOST_TInt32 h= getHeight();
+ GHOST_TInt32 w = getWidth();
+ GHOST_TInt32 h = getHeight();
/* highly unlikely but avoid eternal loop */
- if (w-ofs*2 <= 0 || h-ofs*2 <= 0) {
+ if (w - ofs * 2 <= 0 || h - ofs * 2 <= 0) {
return;
}
- while(x-ofs < m_l) x+= w-(ofs*2);
- while(y-ofs < m_t) y+= h-(ofs*2);
- while(x+ofs > m_r) x-= w-(ofs*2);
- while(y+ofs > m_b) y-= h-(ofs*2);
+ while (x - ofs < m_l) x += w - (ofs * 2);
+ while (y - ofs < m_t) y += h - (ofs * 2);
+ while (x + ofs > m_r) x -= w - (ofs * 2);
+ while (y + ofs > m_b) y -= h - (ofs * 2);
}
inline bool GHOST_Rect::isInside(GHOST_TInt32 x, GHOST_TInt32 y) const