|
LibreOffice Module basegfx (master) 1
|
Multiple ranges in one object. More...
#include <b2dpolyrange.hxx>
Public Types | |
| typedef std::tuple< B2DRange, B2VectorOrientation > | ElementType |
Public Member Functions | |
| B2DPolyRange () | |
| ~B2DPolyRange () | |
| B2DPolyRange (const B2DPolyRange &) | |
| Create a multi range with exactly one containing range. More... | |
| B2DPolyRange & | operator= (const B2DPolyRange &) |
| bool | operator== (const B2DPolyRange &) const |
| bool | operator!= (const B2DPolyRange &) const |
| sal_uInt32 | count () const |
| Number of included ranges. More... | |
| ElementType | getElement (sal_uInt32 nIndex) const |
| void | appendElement (const B2DRange &rRange, B2VectorOrientation eOrient) |
| void | clear () |
| bool | overlaps (const B2DRange &rRange) const |
| Test whether given range overlaps one or more of the included ranges. More... | |
| B2DPolyPolygon | solveCrossovers () const |
| Request a poly-polygon with solved cross-overs. More... | |
| void | transform (const B2DHomMatrix &rTranslate) |
Private Attributes | |
| o3tl::cow_wrapper< ImplB2DPolyRange > | mpImpl |
Multiple ranges in one object.
This class combines multiple ranges in one object, providing a total, enclosing range for it.
You can use this class e.g. when updating views containing rectangular objects. Add each modified object to a B2DMultiRange, then test each viewable object against intersection with the multi range.
Similar in spirit to the poly-polygon vs. polygon relationship.
Note that comparable to polygons, a poly-range can also contain 'holes' - this is encoded via polygon orientation at the poly-polygon, and via explicit flags for the poly-range.
Definition at line 50 of file b2dpolyrange.hxx.
| typedef std::tuple<B2DRange, B2VectorOrientation> basegfx::B2DPolyRange::ElementType |
Definition at line 53 of file b2dpolyrange.hxx.
|
default |
|
default |
|
default |
Create a multi range with exactly one containing range.
| void basegfx::B2DPolyRange::appendElement | ( | const B2DRange & | rRange, |
| B2VectorOrientation | eOrient | ||
| ) |
Definition at line 127 of file b2dpolyrange.cxx.
References mpImpl.
Referenced by basegfx::utils::ImplB2DClipState::addRange().
| void basegfx::B2DPolyRange::clear | ( | ) |
Definition at line 132 of file b2dpolyrange.cxx.
References mpImpl.
Referenced by basegfx::utils::ImplB2DClipState::commitPendingRanges(), and basegfx::utils::ImplB2DClipState::makeNull().
| sal_uInt32 basegfx::B2DPolyRange::count | ( | ) | const |
Number of included ranges.
Definition at line 117 of file b2dpolyrange.cxx.
References mpImpl.
Referenced by basegfx::utils::ImplB2DClipState::commitPendingRanges(), basegfx::utils::ImplB2DClipState::isCleared(), and basegfx::utils::ImplB2DClipState::isNull().
| B2DPolyRange::ElementType basegfx::B2DPolyRange::getElement | ( | sal_uInt32 | nIndex | ) | const |
Definition at line 122 of file b2dpolyrange.cxx.
| bool basegfx::B2DPolyRange::operator!= | ( | const B2DPolyRange & | rRange | ) | const |
Definition at line 112 of file b2dpolyrange.cxx.
|
default |
References count, operator!=(), and operator==().
| bool basegfx::B2DPolyRange::operator== | ( | const B2DPolyRange & | rRange | ) | const |
Definition at line 104 of file b2dpolyrange.cxx.
References mpImpl.
| bool basegfx::B2DPolyRange::overlaps | ( | const B2DRange & | rRange | ) | const |
Test whether given range overlaps one or more of the included ranges.
Does not use overall range, but checks individually.
Definition at line 137 of file b2dpolyrange.cxx.
References mpImpl.
| B2DPolyPolygon basegfx::B2DPolyRange::solveCrossovers | ( | ) | const |
Request a poly-polygon with solved cross-overs.
Definition at line 147 of file b2dpolyrange.cxx.
References mpImpl.
Referenced by basegfx::utils::ImplB2DClipState::commitPendingRanges().
| void basegfx::B2DPolyRange::transform | ( | const B2DHomMatrix & | rTranslate | ) |
Definition at line 142 of file b2dpolyrange.cxx.
References mpImpl.
Referenced by basegfx::utils::ImplB2DClipState::transform().
|
private |
Definition at line 89 of file b2dpolyrange.hxx.
Referenced by appendElement(), clear(), count(), getElement(), operator==(), overlaps(), solveCrossovers(), and transform().