|
| void | AssertElementsInsideReach (const Projection &projection, const MapParameter ¶meter, const Vertex2D &point, const std::vector< LabelData > &data, const LabelInstanceType &instance) const |
| | Debug check of the conservative bound the early decision uses: the rectangle of every element a label built has to stay inside the anchor plus the reach of the label.
|
| bool | CannotReachViewport (const Projection &projection, const MapParameter ¶meter, const Vertex2D &point, const LabelData &data) const |
| bool | CannotReachViewport (const Projection &projection, const MapParameter ¶meter, const Vertex2D &point, const std::vector< LabelData > &data) const |
| | Returns true when no element of the label can intersect the layout viewport and when the label cannot suppress a label inside it, i.e.
|
| const std::vector< ContourLabelType > & | ContourLabels () const |
| template<class Painter> |
| void | DrawLabels (const Projection &projection, const MapParameter ¶meter, Painter *p) |
| template<class Painter> |
| void | DrawTextLabels (const Projection &, const MapParameter &, Painter *) const |
| size_t | GetGlyphCount () const |
| | Return the number of remembered measurements whose glyph data has been derived.
|
| size_t | GetMaxMeasurementCount () const |
| | Return the number of label measurements that are remembered at most.
|
| size_t | GetMeasurementCount () const |
| | Return the number of label measurements that are remembered at the moment.
|
| | LabelLayouter (TextLayouter *textLayouter, size_t maxMeasurementCount=defaultMeasurementCount) |
| double | LabelReach (const Projection &projection, const MapParameter ¶meter, const std::vector< LabelData > &data) const |
| | Upper bound [pixels] of the distance the elements of a label can reach from the anchor position of that label: the measured rectangle of an element stays inside the anchor plus this distance, and the overlap canvases of the layout mark an element with the widest padding of the frame around that rectangle.
|
| const std::vector< LabelInstanceType > & | Labels () const |
| void | Layout (const Projection &projection, const MapParameter ¶meter) |
| void | ProcessLabel (const Projection &projection, const MapParameter ¶meter, const Vertex2D &point, LabelInstanceType &instance, double &offset, const LabelData &data, double objectWidth) |
| void | RegisterContourLabel (const Projection &projection, const MapParameter ¶meter, bool basemap, const ObjectFileRef &ref, const PathLabelData &labelData, const LabelPath &labelPath) |
| void | RegisterLabel (const Projection &projection, const MapParameter ¶meter, bool basemap, const ObjectFileRef &ref, const Vertex2D &point, const LabelData &data, double objectWidth=10.0) |
| void | RegisterLabel (const Projection &projection, const MapParameter ¶meter, bool basemap, const ObjectFileRef &ref, const Vertex2D &point, const std::vector< LabelData > &data, double objectWidth=10.0) |
| void | Reset () |
| void | SetLayoutOverlap (uint32_t overlap) |
| void | SetMeasurementEnvironment (const std::string &environment) |
| | Set the measurement environment the measurements of the following frame are made in: the state a backend's measurements depend on that is not an argument of Layout() - the resolved font, the resolution of the drawing target, its font settings.
|
| void | SetViewport (const ScreenVectorRectangle &v) |
template<class NativeGlyph, class NativeLabel, class TextLayouter>
class osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >
- Template Parameters
-
| NativeGlyph | |
| NativeLabel | |
| TextLayouter | - class providing low level text layouting required methods: |
// glyph bounding box relative to its base point DoubleScreenRectangle GlyphBoundingBox(const NativeGlyph &) const
// layout text for label std::shared_ptr<Label<NativeGlyph, NativeLabel>> Layout( const Projection& projection, const MapParameter& parameter, const std::string& text, double fontSize, double objectWidth, bool enableWrapping = false, bool contourLabel = false);
template<class NativeGlyph, class NativeLabel, class TextLayouter>
template<class NativeGlyph, class NativeLabel, class TextLayouter>
Returns true when no element of the label can intersect the layout viewport and when the label cannot suppress a label inside it, i.e.
when the label provably has no effect on the frame and does not have to be measured, stored or laid out.
Referenced by osmscout::LabelLayouter< NativeGlyph, NativeLabel, MapPainterAgg >::CannotReachViewport(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, MapPainterAgg >::RegisterLabel(), and osmscout::LabelLayouter< NativeGlyph, NativeLabel, MapPainterAgg >::RegisterLabel().
template<class NativeGlyph, class NativeLabel, class TextLayouter>
template<class NativeGlyph, class NativeLabel, class TextLayouter>
| void osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::SetMeasurementEnvironment |
( |
const std::string & | environment | ) |
|
|
inline |
Set the measurement environment the measurements of the following frame are made in: the state a backend's measurements depend on that is not an argument of Layout() - the resolved font, the resolution of the drawing target, its font settings.
A backend calls this once per frame, before it registers labels. While the environment is unchanged the measurements of earlier frames stay valid; when it changes they are dropped, because the backend would measure them differently now.
A backend that never sets an environment has an empty one, which means that its measurements depend on the arguments of Layout() alone.