libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob Struct Reference

#include <libosmscout-map/include/osmscoutmap/LabelLayouter.h>

Collaboration diagram for osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob:

Public Member Functions

 LayoutJob (const ScreenVectorRectangle &layoutViewport, const Projection &projection, const MapParameter &parameter)
 LayoutJob (const LayoutJob &)=delete
 LayoutJob (LayoutJob &&)=delete
 ~LayoutJob ()=default
LayoutJoboperator= (const LayoutJob &)=delete
LayoutJoboperator= (LayoutJob &&)=delete
void Swap (std::vector< LabelInstanceType > &labelInstances, std::vector< ContourLabelType > &contourLabelInstances)
void SortLabels ()
double GetLabelPadding (const LabelData &labelData) const
ScreenMask * GetCanvas (LabelData data)
void ProcessLabelInstance (const LabelInstanceType &currentLabel, std::vector< LabelInstanceType > &labelInstances)
void ProcessLabelContourLabel (const ContourLabelType &currentContourLabel, std::vector< ContourLabelType > &contourLabelInstances)
void ProcessLabels (std::vector< LabelInstanceType > &labelInstances, std::vector< ContourLabelType > &contourLabelInstances)

Public Attributes

ScreenVectorRectangle layoutViewport
double iconPadding
double labelPadding
double shieldLabelPadding
double contourLabelPadding
double overlayLabelPadding
std::vector< ContourLabelTypeallSortedContourLabels
std::vector< LabelInstanceTypeallSortedLabels
ScreenMask iconCanvas
ScreenMask labelCanvas
ScreenMask overlayCanvas

Detailed Description

template<class NativeGlyph, class NativeLabel, class TextLayouter>
struct osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob

Layout job initializes separate canvases for icons/symbols, labels and overlay labels. Then takes all registered labels and contour labels and sort them by priority. Note that labels includes standard labels, icons/symbols and overlay labels. As final step process labels and contour labels (from highest priority) and check its visual rectangle in corresponding canvas. When pixels are not occupied yet, it is added and pixels on canvas mark.

Constructor & Destructor Documentation

◆ LayoutJob() [1/3]

template<class NativeGlyph, class NativeLabel, class TextLayouter>
osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::LayoutJob ( const ScreenVectorRectangle & layoutViewport,
const Projection & projection,
const MapParameter & parameter )
inline

◆ LayoutJob() [2/3]

template<class NativeGlyph, class NativeLabel, class TextLayouter>
osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::LayoutJob ( const LayoutJob & )
delete

◆ LayoutJob() [3/3]

template<class NativeGlyph, class NativeLabel, class TextLayouter>
osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::LayoutJob ( LayoutJob && )
delete

◆ ~LayoutJob()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::~LayoutJob ( )
default

Member Function Documentation

◆ GetCanvas()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
ScreenMask * osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::GetCanvas ( LabelData data)
inline

◆ GetLabelPadding()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::GetLabelPadding ( const LabelData & labelData) const
inline

◆ operator=() [1/2]

template<class NativeGlyph, class NativeLabel, class TextLayouter>
LayoutJob & osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::operator= ( const LayoutJob & )
delete

◆ operator=() [2/2]

template<class NativeGlyph, class NativeLabel, class TextLayouter>
LayoutJob & osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::operator= ( LayoutJob && )
delete

◆ ProcessLabelContourLabel()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
void osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelContourLabel ( const ContourLabelType & currentContourLabel,
std::vector< ContourLabelType > & contourLabelInstances )
inline

◆ ProcessLabelInstance()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
void osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelInstance ( const LabelInstanceType & currentLabel,
std::vector< LabelInstanceType > & labelInstances )
inline

◆ ProcessLabels()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
void osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabels ( std::vector< LabelInstanceType > & labelInstances,
std::vector< ContourLabelType > & contourLabelInstances )
inline

◆ SortLabels()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
void osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::SortLabels ( )
inline

◆ Swap()

template<class NativeGlyph, class NativeLabel, class TextLayouter>
void osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::Swap ( std::vector< LabelInstanceType > & labelInstances,
std::vector< ContourLabelType > & contourLabelInstances )
inline

Member Data Documentation

◆ allSortedContourLabels

template<class NativeGlyph, class NativeLabel, class TextLayouter>
std::vector<ContourLabelType> osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::allSortedContourLabels

◆ allSortedLabels

template<class NativeGlyph, class NativeLabel, class TextLayouter>
std::vector<LabelInstanceType> osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::allSortedLabels

◆ contourLabelPadding

template<class NativeGlyph, class NativeLabel, class TextLayouter>
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::contourLabelPadding

◆ iconCanvas

template<class NativeGlyph, class NativeLabel, class TextLayouter>
ScreenMask osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::iconCanvas

◆ iconPadding

template<class NativeGlyph, class NativeLabel, class TextLayouter>
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::iconPadding

◆ labelCanvas

template<class NativeGlyph, class NativeLabel, class TextLayouter>
ScreenMask osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelCanvas

◆ labelPadding

template<class NativeGlyph, class NativeLabel, class TextLayouter>
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelPadding

◆ layoutViewport

template<class NativeGlyph, class NativeLabel, class TextLayouter>
ScreenVectorRectangle osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::layoutViewport

◆ overlayCanvas

template<class NativeGlyph, class NativeLabel, class TextLayouter>
ScreenMask osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::overlayCanvas

◆ overlayLabelPadding

template<class NativeGlyph, class NativeLabel, class TextLayouter>
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::overlayLabelPadding

◆ shieldLabelPadding

template<class NativeGlyph, class NativeLabel, class TextLayouter>
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::shieldLabelPadding

The documentation for this struct was generated from the following file: