PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Fix to 0.45b

People have reported problem with class Rect in PocketFrog 0.45b: it is missing two methods. Here they are:

Code:

class Rect
{
public:

bool IsEmpty() const
{ return (right <= left) || (bottom <= top); }

void Intersect( const RECT& rect )
{
if (left < rect.left) left = rect.left;
if (top < rect.top) top = rect.top;
if (right > rect.right) right = rect.right;
if (bottom > rect.bottom) bottom = rect.bottom;
}
};