libosmscout  1.1.1
MapPainterNoOp.h
Go to the documentation of this file.
1 #ifndef OSMSCOUT_MAP_MAPPAINTERNOOP_H
2 #define OSMSCOUT_MAP_MAPPAINTERNOOP_H
3 /*
4  This source is part of the libosmscout-map library
5  Copyright (C) 2015 Tim Teulings
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 
22 #include <osmscout/MapPainter.h>
23 
24 namespace osmscout {
36  {
37  protected:
38  bool HasIcon(const StyleConfig& styleConfig,
39  const Projection& projection,
40  const MapParameter& parameter,
41  IconStyle& style) override;
42 
43  double GetFontHeight(const Projection& projection,
44  const MapParameter& parameter,
45  double fontSize) override;
46 
47  void DrawGround(const Projection& projection,
48  const MapParameter& parameter,
49  const FillStyle& style) override;
50 
51  void RegisterRegularLabel(const Projection& projection,
52  const MapParameter& parameter,
53  const std::vector<LabelData> &labels,
54  const Vertex2D& position,
55  double objectWidth) override;
56 
57  void RegisterContourLabel(const Projection &projection,
58  const MapParameter &parameter,
59  const PathLabelData &label,
60  const LabelPath &labelPath) override;
61 
62  void DrawLabels(const Projection& projection,
63  const MapParameter& parameter,
64  const MapData& data) override;
65 
66  void DrawIcon(const IconStyle* style,
67  double centerX, double centerY,
68  double width, double height) override;
69 
70  void DrawSymbol(const Projection& projection,
71  const MapParameter& parameter,
72  const Symbol& symbol,
73  double x,
74  double y) override;
75 
76  void DrawPath(const Projection& projection,
77  const MapParameter& parameter,
78  const Color& color,
79  double width,
80  const std::vector<double>& dash,
81  LineStyle::CapStyle startCap,
82  LineStyle::CapStyle endCap,
83  size_t transStart,
84  size_t transEnd) override;
85 
86  void DrawContourSymbol(const Projection& projection,
87  const MapParameter& parameter,
88  const Symbol& symbol,
89  double space,
90  size_t transStart,
91  size_t transEnd) override;
92 
93  void DrawArea(const Projection& projection,
94  const MapParameter& parameter,
95  const AreaData& area) override;
96 
97  public:
98  explicit MapPainterNoOp(const StyleConfigRef& styleConfig);
99 
100  ~MapPainterNoOp() override = default;
101 
102  bool DrawMap(const Projection& projection,
103  const MapParameter& parameter,
104  const MapData& data);
105  };
106 
107 }
108 
109 #endif
Definition: Styles.h:884
Index selectors by type and level.
Definition: StyleConfig.h:553
Definition: LabelLayouter.h:87
Definition: Projection.h:43
Definition: MapPainter.h:75
Definition: Area.h:38
Definition: Styles.h:1135
Definition: LabelPath.h:42
#define OSMSCOUT_MAP_API
Definition: MapImportExport.h:45
std::shared_ptr< StyleConfig > StyleConfigRef
Definition: StyleConfig.h:849
Definition: MapPainter.h:87
Definition: Styles.h:280
Definition: MapPainterNoOp.h:35
Definition: MapPainter.h:179
CapStyle
Definition: Styles.h:69