#include <b2dconnectedranges.hxx>

Public Types | |
| typedef ::std::pair< B2DRange, UserData > | ComponentType |
| Type of the basic entity (rect + user data). | |
| typedef ::std::list < ComponentType > | ComponentListType |
| typedef ::std::list < ConnectedComponents > | ConnectedComponentsType |
Public Member Functions | |
| B2DConnectedRanges () | |
| Create the range calculator. | |
| B2DRange | getBounds () const |
| Query total bounds of all added ranges. | |
| void | addRange (const B2DRange &rRange, const UserData &rUserData) |
| Add an additional range. | |
| template<typename UnaryFunctor> | |
| UnaryFunctor | forEachAggregate (UnaryFunctor aFunctor) const |
| Apply a functor to each of the disjunct component aggregates. | |
Private Member Functions | |
| B2DConnectedRanges (const B2DConnectedRanges &) | |
| B2DConnectedRanges & | operator= (const B2DConnectedRanges &) |
Private Attributes | |
| ConnectedComponentsType | maDisjunctAggregatesList |
| Current list of disjunct sets of connected components. | |
| B2DRange | maTotalBounds |
| Global bound rect over all added ranges. | |
Classes | |
| struct | ConnectedComponents |
| List of (intersecting) components, plus overall bounds. More... | |
This template constructs a list of connected ranges from the given input ranges. That is, the output will contain a set of ranges, itself containing a number of input ranges, which will be mutually non-intersecting.
Example: ------------------- | -------| | | || | --- | || | | | -------| -------- | | +--------- | | | | --+ | | | | | | | | -------- | ---------- | ------------------- </code
Here, the outer rectangles represent the output ranges. Contained are the input rectangles that comprise these output ranges.
Definition at line 70 of file b2dconnectedranges.hxx.
| typedef ::std::pair< B2DRange, UserData > basegfx::B2DConnectedRanges< UserData >::ComponentType |
| typedef ::std::list< ComponentType > basegfx::B2DConnectedRanges< UserData >::ComponentListType |
Definition at line 75 of file b2dconnectedranges.hxx.
| typedef ::std::list< ConnectedComponents > basegfx::B2DConnectedRanges< UserData >::ConnectedComponentsType |
Definition at line 84 of file b2dconnectedranges.hxx.
| basegfx::B2DConnectedRanges< UserData >::B2DConnectedRanges | ( | ) | [inline] |
| basegfx::B2DConnectedRanges< UserData >::B2DConnectedRanges | ( | const B2DConnectedRanges< UserData > & | ) | [private] |
| B2DRange basegfx::B2DConnectedRanges< UserData >::getBounds | ( | ) | const [inline] |
Query total bounds of all added ranges.
Definition at line 98 of file b2dconnectedranges.hxx.
References basegfx::B2DConnectedRanges< UserData >::maTotalBounds.
| void basegfx::B2DConnectedRanges< UserData >::addRange | ( | const B2DRange & | rRange, | |
| const UserData & | rUserData | |||
| ) | [inline] |
Add an additional range.
This method integrates a new range into the connected ranges lists. The method has a worst-case time complexity of O(n^2), with n denoting the number of already added ranges (typically, for well-behaved input, it is O(n) though).
Definition at line 111 of file b2dconnectedranges.hxx.
References basegfx::B2DRange::expand(), basegfx::B2DRange::isEmpty(), basegfx::B2DConnectedRanges< UserData >::ConnectedComponents::maComponentList, basegfx::B2DConnectedRanges< UserData >::maDisjunctAggregatesList, basegfx::B2DConnectedRanges< UserData >::ConnectedComponents::maTotalBounds, basegfx::B2DConnectedRanges< UserData >::maTotalBounds, and basegfx::B2DRange::overlaps().
| UnaryFunctor basegfx::B2DConnectedRanges< UserData >::forEachAggregate | ( | UnaryFunctor | aFunctor | ) | const [inline] |
Apply a functor to each of the disjunct component aggregates.
| aFunctor | Functor to apply. Must provide an operator( const ConnectedComponents& ). |
Definition at line 238 of file b2dconnectedranges.hxx.
References basegfx::B2DConnectedRanges< UserData >::maDisjunctAggregatesList.
| B2DConnectedRanges& basegfx::B2DConnectedRanges< UserData >::operator= | ( | const B2DConnectedRanges< UserData > & | ) | [private] |
ConnectedComponentsType basegfx::B2DConnectedRanges< UserData >::maDisjunctAggregatesList [private] |
Current list of disjunct sets of connected components.
Each entry corresponds to one of the top-level rectangles in the drawing above.
Definition at line 255 of file b2dconnectedranges.hxx.
Referenced by basegfx::B2DConnectedRanges< UserData >::addRange(), and basegfx::B2DConnectedRanges< UserData >::forEachAggregate().
B2DRange basegfx::B2DConnectedRanges< UserData >::maTotalBounds [private] |
Global bound rect over all added ranges.
Definition at line 259 of file b2dconnectedranges.hxx.
Referenced by basegfx::B2DConnectedRanges< UserData >::addRange(), and basegfx::B2DConnectedRanges< UserData >::getBounds().
1.5.6