Commit 4c666eda authored by papillon's avatar papillon
Browse files

* added reset() in Roi/Bin classes



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@44 45c4679d-1946-429d-baad-37912b19538b
parent 6ab2e0d1
......@@ -179,6 +179,12 @@ class Bin
int getY() const
{ return m_xy.y; }
bool isOne() const
{ return ((m_xy.x==1) && (m_xy.y==1)); }
void reset()
{ m_xy.x= 1; m_xy.y= 1; }
operator Point() const
{ return m_xy; }
......@@ -240,6 +246,9 @@ class Roi
const Point& getTopLeft() const;
const Size& getSize() const;
bool isEmpty() const;
void reset();
Point getTopRight() const;
Point getBottomLeft() const;
Point getBottomRight() const;
......@@ -264,6 +273,18 @@ class Roi
Size m_size;
};
inline bool Roi::isEmpty() const
{
return m_size.isEmpty();
}
inline void Roi::reset()
{
m_top_left.x= 0;
m_top_left.y= 0;
m_size= Size(0,0);
}
inline Roi& Roi::operator =(const Roi& r)
{
m_top_left = r.m_top_left;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment