Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
dw::core::Region Class Reference

Implementation for a point set. More...

#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.
 
lout::container::typed::Iterator< Rectanglerectangles ()
 

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 ().

Definition at line 140 of file types.hh.

Constructor & Destructor Documentation

◆ Region()

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

Definition at line 223 of file types.cc.

References rectangleList.

◆ ~Region()

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

Definition at line 228 of file types.cc.

References rectangleList.

Member Function Documentation

◆ addRectangle()

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

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.

Definition at line 239 of file types.cc.

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

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

◆ clear()

void dw::core::Region::clear ( )
inline

Definition at line 149 of file types.hh.

References rectangleList.

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

◆ rectangles()

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

Definition at line 153 of file types.hh.

References rectangleList.

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

Member Data Documentation

◆ rectangleList

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

Definition at line 143 of file types.hh.

Referenced by addRectangle(), clear(), rectangles(), Region(), and ~Region().


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