libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob Struct Reference

Layout job initializes separate canvases for icons/symbols, labels and overlay labels. More...

#include <LabelLayouter.h>

Public Member Functions

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

Public Attributes

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

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

◆ GetLabelPadding()

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

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

◆ 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

◆ 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

◆ 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: