libosmscout
0.1
|
#include <LabelLayouter.h>
Classes | |
struct | LayoutJob |
Layout job initializes separate canvases for icons/symbols, labels and overlay labels. More... | |
Public Types | |
using | ContourLabelType = ContourLabel< NativeGlyph > |
using | LabelInstanceType = LabelInstance< NativeGlyph, NativeLabel > |
using | LabelPtr = std::shared_ptr< LabelType > |
using | LabelType = Label< NativeGlyph, NativeLabel > |
Public Member Functions | |
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 |
LabelLayouter (TextLayouter *textLayouter) | |
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, const ObjectFileRef &ref, const PathLabelData &labelData, const LabelPath &labelPath) |
void | RegisterLabel (const Projection &projection, const MapParameter ¶meter, const ObjectFileRef &ref, const Vertex2D &point, const LabelData &data, double objectWidth=10.0) |
void | RegisterLabel (const Projection &projection, const MapParameter ¶meter, const ObjectFileRef &ref, const Vertex2D &point, const std::vector< LabelData > &data, double objectWidth=10.0) |
void | Reset () |
void | SetLayoutOverlap (uint32_t overlap) |
void | SetViewport (const ScreenVectorRectangle &v) |
Static Public Member Functions | |
static bool | IsOverlay (const LabelData &labelData) |
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);
using osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::ContourLabelType = ContourLabel<NativeGlyph> |
using osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LabelInstanceType = LabelInstance<NativeGlyph, NativeLabel> |
using osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LabelPtr = std::shared_ptr<LabelType> |
using osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LabelType = Label<NativeGlyph, NativeLabel> |
|
inlineexplicit |
|
inline |
|
inline |
Painter | required methods: void DrawSymbol(const Projection& projection, const MapParameter& parameter, onst Symbol& symbol, double x, double y) override; void DrawIcon(const IconStyle* style, double centerX, double centerY, double width, double height) override; void DrawLabel(const Projection& projection, const MapParameter& parameter, const DoubleScreenRectangle& labelRectangle, const LabelData& label, const std::shared_ptr<NativeLabel>& layout); void DrawGlyphs(const Projection &projection, const MapParameter ¶meter, const osmscout::PathTextStyleRef style, const std::vector<Glyph<NativeGlyph>> &glyphs); |
projection | |
parameter | |
p | - painter pointer |
Referenced by osmscout::MapPainterCairo::DrawLabels(), osmscout::MapPainterAgg::DrawLabels(), osmscout::MapPainterSVG::DrawLabels(), and osmscout::MapPainterQt::DrawLabels().
|
inline |
|
inlinestatic |
Referenced by osmscout::LabelLayouter< QGlyphRun, QTextLayout, MapPainterQt >::DrawLabels(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::GetCanvas(), osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::GetLabelPadding(), and osmscout::LabelLayouter< NativeGlyph, NativeLabel, TextLayouter >::LayoutJob::ProcessLabelInstance().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |