libosmscout 0.1
Loading...
Searching...
No Matches
LabelLayouterHelper.cpp File Reference

Namespaces

namespace  osmscout
 Original source: https://github.com/philipperemy/easy-encryption/blob/master/b64.h licensed under terms of MIT license.
 

Functions

size_t osmscout::CountLabelWords (const std::string_view &text)
 Number of words of a text, i.e.
 
double osmscout::GetLabelExtentBound (size_t characterCount, size_t wordCount, double fontSizePixel)
 Conservative upper bound [pixels] of half of the larger side of the rectangle a label can occupy after layout, derived from the number of characters and words of its text and from the pixel size of its font.
 
double osmscout::GetLabelLayoutMarginPixel (const Projection &projection, const MapParameter &parameter)
 The margin [pixels] outside the visible view in which a label element can still take part in a frame: the label layout marks elements in a view that is enlarged by the layouter overlap, and it marks them with a padding around their rectangle.
 
double osmscout::GetMaxLabelPaddingPixel (const Projection &projection, const MapParameter &parameter)
 The widest padding [pixels] the label layout adds around a label element when it marks the element in the overlap canvases of a frame.
 

Variables

constexpr double osmscout::maxLabelAdvanceFactor =1.5
 
constexpr double osmscout::maxLabelLineHeightFactor =1.5