LibreOffice Module basegfx (master) 1
Public Types | Public Member Functions | Private Attributes | List of all members
basegfx::B2DPolyRange Class Reference

Multiple ranges in one object. More...

#include <b2dpolyrange.hxx>

Collaboration diagram for basegfx::B2DPolyRange:
[legend]

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
 

Detailed Description

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.

Member Typedef Documentation

◆ ElementType

Definition at line 53 of file b2dpolyrange.hxx.

Constructor & Destructor Documentation

◆ B2DPolyRange() [1/2]

basegfx::B2DPolyRange::B2DPolyRange ( )
default

◆ ~B2DPolyRange()

basegfx::B2DPolyRange::~B2DPolyRange ( )
default

◆ B2DPolyRange() [2/2]

basegfx::B2DPolyRange::B2DPolyRange ( const B2DPolyRange &  )
default

Create a multi range with exactly one containing range.

Member Function Documentation

◆ appendElement()

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

◆ clear()

void basegfx::B2DPolyRange::clear ( )

◆ count()

sal_uInt32 basegfx::B2DPolyRange::count ( ) const

◆ getElement()

B2DPolyRange::ElementType basegfx::B2DPolyRange::getElement ( sal_uInt32  nIndex) const

Definition at line 122 of file b2dpolyrange.cxx.

References mpImpl, and nIndex.

◆ operator!=()

bool basegfx::B2DPolyRange::operator!= ( const B2DPolyRange &  rRange) const

Definition at line 112 of file b2dpolyrange.cxx.

◆ operator=()

B2DPolyRange & basegfx::B2DPolyRange::operator= ( const B2DPolyRange &  )
default

References count, operator!=(), and operator==().

◆ operator==()

bool basegfx::B2DPolyRange::operator== ( const B2DPolyRange &  rRange) const

Definition at line 104 of file b2dpolyrange.cxx.

References mpImpl.

◆ overlaps()

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.

◆ solveCrossovers()

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

◆ transform()

void basegfx::B2DPolyRange::transform ( const B2DHomMatrix &  rTranslate)

Definition at line 142 of file b2dpolyrange.cxx.

References mpImpl.

Referenced by basegfx::utils::ImplB2DClipState::transform().

Member Data Documentation

◆ mpImpl

o3tl::cow_wrapper< ImplB2DPolyRange > basegfx::B2DPolyRange::mpImpl
private

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