Dillo
Public Member Functions | Private Attributes | List of all members
dw::core::Region Class Reference

#include <types.hh>

Public Member Functions

 Region ()
 
 ~Region ()
 
void clear ()
 
void addRectangle (Rectangle *r)
 Add a rectangle to the region and combine it with existing rectangles if possible. The number of rectangles is forced to be less than 16 by combining excessive rectangles. More...
 
lout::container::typed::Iterator
< Rectangle
rectangles ()
 

Private Attributes

lout::container::typed::List
< Rectangle > * 
rectangleList
 

Detailed Description

Implementation for a point set. Currently represented as a set of rectangles not containing each other. It is guaranteed that the rectangles returned by rectangles () cover all rectangles that were added with addRectangle ().

Constructor & Destructor Documentation

dw::core::Region::Region ( )
dw::core::Region::~Region ( )

Member Function Documentation

void dw::core::Region::addRectangle ( Rectangle r)

Add a rectangle to the region and combine it with existing rectangles if possible. The number of rectangles is forced to be less than 16 by combining excessive rectangles.

References lout::container::typed::Iterator< T >::getNext(), lout::container::typed::Iterator< T >::hasNext(), dw::core::Rectangle::height, lout::misc::max(), lout::misc::min(), dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.

Referenced by dw::fltk::FltkViewBase::queueDraw().

void dw::core::Region::clear ( )
inline
lout::container::typed::Iterator<Rectangle> dw::core::Region::rectangles ( )
inline

Member Data Documentation

lout::container::typed::List<Rectangle>* dw::core::Region::rectangleList
private

The documentation for this class was generated from the following files: