1 #ifndef OSMSCOUT_MAP_MAPPAINTERCAIRO_H 2 #define OSMSCOUT_MAP_MAPPAINTERCAIRO_H 23 #include <osmscout/MapCairoFeatures.h> 26 #include <unordered_map> 28 #if defined(__WIN32__) || defined(WIN32) 31 #include <cairo/cairo.h> 34 #if defined(OSMSCOUT_MAP_CAIRO_HAVE_LIB_PANGO) 35 #include <pango/pangocairo.h> 36 #include <pango/pango-glyph.h> 49 #if defined(OSMSCOUT_MAP_CAIRO_HAVE_LIB_PANGO) 52 struct PangoStandaloneGlyph {
53 std::shared_ptr<PangoFont> font;
54 std::shared_ptr<PangoGlyphString> glyphString;
84 using FontMap = std::unordered_map<size_t,CairoFont>;
87 std::vector<cairo_surface_t*> images;
88 std::vector<cairo_surface_t*> patternImages;
89 std::vector<cairo_pattern_t*> patterns;
91 double minimumLineWidth;
97 const MapParameter& parameter,
100 void SetLineAttributes(
const Color& color,
102 const std::vector<double>& dash);
104 void DrawFillStyle(
const Projection& projection,
105 const MapParameter& parameter,
112 const MapParameter& parameter,
115 bool HasPattern(
const MapParameter& parameter,
118 double GetFontHeight(
const Projection& projection,
119 const MapParameter& parameter,
120 double fontSize)
override;
123 const MapParameter& parameter,
126 std::shared_ptr<CairoLabel> Layout(
const Projection& projection,
127 const MapParameter& parameter,
128 const std::string& text,
131 bool enableWrapping =
false,
132 bool contourLabel =
false);
137 const MapParameter& parameter,
143 const MapParameter ¶meter,
145 const std::vector<CairoGlyph> &glyphs);
149 const MapParameter& parameter,
150 const MapData& data)
override;
156 void RegisterRegularLabel(
const Projection& projection,
157 const MapParameter& parameter,
158 const std::vector<LabelData>& labels,
159 const Vertex2D& position,
160 double objectWidth)
override;
165 void RegisterContourLabel(
const Projection& projection,
166 const MapParameter& parameter,
171 const MapParameter& parameter,
172 const MapData& data)
override;
174 void DrawPrimitivePath(
const Projection& projection,
175 const MapParameter& parameter,
184 const MapParameter& parameter,
186 double x,
double y)
override;
189 double centerX,
double centerY,
190 double width,
double height)
override;
193 const MapParameter& parameter,
196 const std::vector<double>& dash,
199 size_t transStart,
size_t transEnd)
override;
201 void DrawContourSymbol(
const Projection& projection,
202 const MapParameter& parameter,
205 size_t transStart,
size_t transEnd)
override;
208 const MapParameter& parameter,
217 const MapParameter& parameter,
Definition: LabelLayouter.h:144
Definition: MapPainterCairo.h:67
std::wstring wstr
Definition: MapPainterCairo.h:61
double width
Definition: MapPainterCairo.h:69
std::shared_ptr< FillStyle > FillStyleRef
Definition: Styles.h:349
Index selectors by type and level.
Definition: StyleConfig.h:553
double height
Definition: MapPainterCairo.h:70
Definition: LabelLayouter.h:87
Definition: LabelLayouter.h:172
std::shared_ptr< BorderStyle > BorderStyleRef
Definition: Styles.h:458
#define OSMSCOUT_MAP_CAIRO_API
Definition: MapCairoImportExport.h:45
cairo_scaled_font_t * CairoFont
Definition: MapPainterCairo.h:59
Definition: Projection.h:43
Definition: MapPainter.h:75
std::shared_ptr< PathTextStyle > PathTextStyleRef
Definition: Styles.h:877
cairo_text_extents_t textExtents
Definition: MapPainterCairo.h:63
CairoFont font
Definition: MapPainterCairo.h:62
Definition: Styles.h:1135
friend CairoLabelLayouter
Definition: MapPainterCairo.h:79
cairo_font_extents_t fontExtents
Definition: MapPainterCairo.h:64
Definition: LabelPath.h:42
Definition: LabelLayouter.h:98
Definition: MapPainterCairo.h:60
std::shared_ptr< StyleConfig > StyleConfigRef
Definition: StyleConfig.h:849
Definition: MapPainter.h:87
Definition: MapPainterCairo.h:46
Definition: LabelLayouter.h:129
std::shared_ptr< DrawPrimitive > DrawPrimitiveRef
Definition: Styles.h:1021
Definition: MapPainter.h:179
std::string character
Definition: MapPainterCairo.h:68
CapStyle
Definition: Styles.h:69