libosmscout
0.1
|
Layout job initializes separate canvases for icons/symbols, labels and overlay labels. More...
#include <LabelLayouter.h>
Public Member Functions | |
ScreenMask * | GetCanvas (LabelData data) |
double | GetLabelPadding (const LabelData &labelData) const |
LayoutJob (const LayoutJob &)=delete | |
LayoutJob (const ScreenVectorRectangle &layoutViewport, const Projection &projection, const MapParameter ¶meter) | |
LayoutJob (LayoutJob &&)=delete | |
LayoutJob & | operator= (const LayoutJob &)=delete |
LayoutJob & | operator= (LayoutJob &&)=delete |
void | ProcessLabelContourLabel (const ContourLabelType ¤tContourLabel, std::vector< ContourLabelType > &contourLabelInstances) |
void | ProcessLabelInstance (const LabelInstanceType ¤tLabel, 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< ContourLabelType > | allSortedContourLabels |
std::vector< LabelInstanceType > | allSortedLabels |
double | contourLabelPadding |
ScreenMask | iconCanvas |
double | iconPadding |
ScreenMask | labelCanvas |
double | labelPadding |
ScreenVectorRectangle | layoutViewport |
ScreenMask | overlayCanvas |
double | overlayLabelPadding |
double | shieldLabelPadding |
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.
|
inline |
|
delete |
|
delete |
|
default |
|
inline |
References osmscout::LabelData::Icon, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::iconCanvas, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::IsOverlay(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelCanvas, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::overlayCanvas, osmscout::LabelData::Symbol, and osmscout::LabelData::type.
Referenced by osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelInstance().
|
inline |
References osmscout::LabelData::Icon, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::iconPadding, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::IsOverlay(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelPadding, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::overlayLabelPadding, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::shieldLabelPadding, osmscout::LabelData::style, osmscout::LabelData::Symbol, and osmscout::LabelData::type.
Referenced by osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelInstance().
|
delete |
|
delete |
|
inline |
References osmscout::ScreenMask::AddMask(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::contourLabelPadding, osmscout::debugLabelLayouter, osmscout::ContourLabel< NativeGlyph >::glyphs, osmscout::ScreenMask::HasCollision(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelCanvas, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::layoutViewport, osmscout::ContourLabel< NativeGlyph >::priority, osmscout::ScreenVectorRectangle::width, osmscout::ScreenVectorRectangle::x, and osmscout::ScreenVectorRectangle::y.
Referenced by osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabels().
|
inline |
References osmscout::debugLabelLayouter, osmscout::LabelInstance< NativeGlyph, NativeLabel >::elements, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::GetCanvas(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::GetLabelPadding(), osmscout::ScreenMask::HasCollision(), osmscout::LabelData::Icon, osmscout::LabelData::iconHeight, osmscout::LabelData::iconStyle, osmscout::LabelData::iconWidth, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::IsOverlay(), osmscout::LabelInstance< NativeGlyph, NativeLabel >::Element::label, osmscout::LabelInstance< NativeGlyph, NativeLabel >::Element::labelData, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::layoutViewport, osmscout::LabelInstance< NativeGlyph, NativeLabel >::priority, osmscout::LabelInstance< NativeGlyph, NativeLabel >::ref, osmscout::LabelData::Symbol, osmscout::LabelData::text, osmscout::LabelData::type, osmscout::ScreenPixelRectangle::width, osmscout::ScreenVectorRectangle::width, osmscout::ScreenVectorRectangle::x, osmscout::LabelInstance< NativeGlyph, NativeLabel >::Element::x, osmscout::ScreenVectorRectangle::y, and osmscout::LabelInstance< NativeGlyph, NativeLabel >::Element::y.
Referenced by osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabels().
|
inline |
References osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::allSortedContourLabels, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::allSortedLabels, osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelContourLabel(), and osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelInstance().
|
inline |
|
inline |
std::vector<ContourLabelType> osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::allSortedContourLabels |
std::vector<LabelInstanceType> osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::allSortedLabels |
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::contourLabelPadding |
ScreenMask osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::iconCanvas |
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::iconPadding |
ScreenMask osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelCanvas |
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::labelPadding |
ScreenVectorRectangle osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::layoutViewport |
ScreenMask osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::overlayCanvas |
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::overlayLabelPadding |
double osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::shieldLabelPadding |