All pastes #792180 Raw Edit

Rect.h

public cpp v1 · immutable
·published 2007-11-21 05:56 UTC
rendered paste body
//------------------------------------------------------------------------------//  Copyright : (c) 2006//  Authors ://	  JRP	James Prettyman//------------------------------------------------------------------------------#ifndef RECT_H#define RECT_H#include <wtypes.h>//////////////////////////////////////////////////////////////////////////////////--------------------------------------------------------------------------//	Rectangle//--------------------------------------------------------------------------struct Rect: public RECT{	Rect() { left = right = bottom = top = 0; }	Rect(long l, long t, long r, long b)	{		left = l;		top = t;		right = r;		bottom = b;	}	bool operator == (const Rect& rhs) const	{		return			left == rhs.left			&& right == rhs.right			&& top == rhs.top			&& bottom == rhs.bottom;	}	long width() const	{ return right - left; }	long height() const	{ return bottom - top; }};////////////////////////////////////////////////////////////////////////////////#endif