Public Member Functions | Protected Member Functions

Geom::PixRectangle< T > Class Template Reference

Integer rectangle class. More...

Inheritance diagram for Geom::PixRectangle< T >:
Geom::Rectangle< T >

List of all members.

Public Member Functions

 PixRectangle (T l=0, T t=0, T r=0, T b=0)
 PixRectangle (const Point2D< T > &tl, const Point2D< T > &br)
 PixRectangle (const Point2D< T > &tl, const Size2D< T > &sz)
 PixRectangle (const Rectangle< T > &)
bool isInside (const Point2D< T > &) const
bool isOutside (const Point2D< T > &) const
bool isOnSide (const Point2D< T > &) const
bool contains (const Point2D< T > &) const
bool contains (const PixRectangle< T > &) const
bool isInside (const PixRectangle< T > &) const
PixRectangle< T > grownBy (double sidesincreasebyfactor=1) const

Protected Member Functions

bool xOutside (T) const
bool yOutside (T) const

Detailed Description

template<class T>
class Geom::PixRectangle< T >

Integer rectangle class.

The difference with the floating point type rectangle is in range handling. In the float world, everything must be epsiloned. Integer rectangles are more straightforward.


Constructor & Destructor Documentation

template<class T >
Geom::PixRectangle< T >::PixRectangle ( l = 0,
t = 0,
r = 0,
b = 0 
)
template<class T >
Geom::PixRectangle< T >::PixRectangle ( const Point2D< T > &  tl,
const Point2D< T > &  br 
)
template<class T >
Geom::PixRectangle< T >::PixRectangle ( const Point2D< T > &  tl,
const Size2D< T > &  sz 
)
template<class T >
Geom::PixRectangle< T >::PixRectangle ( const Rectangle< T > &  r  ) 

Member Function Documentation

template<class T >
bool Geom::PixRectangle< T >::contains ( const Point2D< T > &  p  )  const [inline]
template<class T >
bool Geom::PixRectangle< T >::contains ( const PixRectangle< T > &  other  )  const [inline]
template<class T >
PixRectangle< T > Geom::PixRectangle< T >::grownBy ( double  sidesincreasebyfactor = 1  )  const [inline]
template<class T >
bool Geom::PixRectangle< T >::isInside ( const Point2D< T > &  p  )  const [inline]
template<class T >
bool Geom::PixRectangle< T >::isInside ( const PixRectangle< T > &  other  )  const [inline]
template<class T >
bool Geom::PixRectangle< T >::isOnSide ( const Point2D< T > &  pt  )  const [inline]
template<class T >
bool Geom::PixRectangle< T >::isOutside ( const Point2D< T > &  p  )  const [inline]
template<class T >
bool Geom::PixRectangle< T >::xOutside ( x  )  const [inline, protected]
template<class T >
bool Geom::PixRectangle< T >::yOutside ( y  )  const [inline, protected]