|
libosmscout 1.1.1
|
#include <libosmscout-map/include/osmscoutmap/MapPainter.h>


Classes | |
| class | WayData |
| struct | WayPathData |
| struct | AreaData |
| struct | RouteLabelData |
| struct | ContourSymbolData |
Public Types | |
| using | WayPathDataIt = std::list<WayPathData>::iterator |
Public Member Functions | |
| MapPainter (const StyleConfigRef &styleConfig) | |
| virtual | ~MapPainter () |
| bool | Draw (const Projection &projection, const MapParameter ¶meter, const MapData &data, RenderSteps startStep, RenderSteps endStep) |
| bool | Draw (const Projection &projection, const MapParameter ¶meter, const MapData &data) |
Protected Member Functions | |
| bool | IsVisibleArea (const Projection &projection, const GeoBox &boundingBox, double pixelOffset) const |
| bool | IsVisibleWay (const Projection &projection, const GeoBox &boundingBox, double pixelOffset) const |
| double | GetProjectedWidth (const Projection &projection, double minPixel, double width) const |
| double | GetProjectedWidth (const Projection &projection, double width) const |
| const std::list< WayData > & | GetWayData () const |
| const std::list< AreaData > & | GetAreaData () const |
| virtual void | AfterPreprocessing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter ¶meter, const MapData &data) |
| virtual void | BeforeDrawing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter ¶meter, const MapData &data) |
| virtual void | AfterDrawing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter ¶meter, const MapData &data) |
| virtual bool | HasIcon (const StyleConfig &styleConfig, const Projection &projection, const MapParameter ¶meter, IconStyle &style)=0 |
| virtual double | GetFontHeight (const Projection &projection, const MapParameter ¶meter, double fontSize)=0 |
| virtual void | DrawGround (const Projection &projection, const MapParameter ¶meter, const FillStyle &style)=0 |
| virtual void | RegisterRegularLabel (const Projection &projection, const MapParameter ¶meter, const ObjectFileRef &ref, const std::vector< LabelData > &labels, const Vertex2D &position, double objectWidth)=0 |
| virtual void | RegisterContourLabel (const Projection &projection, const MapParameter ¶meter, const ObjectFileRef &ref, const PathLabelData &label, const LabelPath &labelPath)=0 |
| virtual void | DrawLabels (const Projection &projection, const MapParameter ¶meter, const MapData &data)=0 |
| virtual void | DrawContourLines (const Projection &projection, const MapParameter ¶meter, const MapData &data) |
| virtual void | DrawHillShading (const Projection &projection, const MapParameter ¶meter, const MapData &data) |
| virtual void | DrawIcon (const IconStyle *style, const Vertex2D ¢erPos, double width, double height)=0 |
| virtual void | DrawSymbol (const Projection &projection, const MapParameter ¶meter, const Symbol &symbol, const Vertex2D &screenPos, double scaleFactor=1.0)=0 |
| virtual void | DrawPath (const Projection &projection, const MapParameter ¶meter, const Color &color, double width, const std::vector< double > &dash, LineStyle::CapStyle startCap, LineStyle::CapStyle endCap, const CoordBufferRange &coordRange)=0 |
| virtual void | DrawContourSymbol (const Projection &projection, const MapParameter ¶meter, const Symbol &symbol, const ContourSymbolData &data)=0 |
| virtual void | DrawArea (const Projection &projection, const MapParameter ¶meter, const AreaData &area)=0 |
| virtual double | GetProposedLabelWidth (const MapParameter ¶meter, double averageCharWidth, double objectWidth, size_t stringLength) |
| virtual void | DrawWay (const StyleConfig &styleConfig, const Projection &projection, const MapParameter ¶meter, const WayData &data) |
| std::vector< OffsetRel > | ParseLaneTurns (const LanesFeatureValue &feature) const |
Protected Attributes | |
| TransBuffer | transBuffer |
| CoordBuffer | coordBuffer |
| Coordinate buffer. | |
| TextStyleRef | debugLabel |
| FillStyleRef | landFill |
| FillStyleRef | seaFill |
| FeatureValueBuffer | coastlineSegmentAttributes |
| StyleConfigRef | styleConfig |
| Reference to the style configuration to be used. | |
| NameFeatureValueReader | nameReader |
| Value reader for the 'name' feature. | |
| NameAltFeatureValueReader | nameAltReader |
| Value reader for the 'alternative name' feature. | |
| RefFeatureValueReader | refReader |
| Value reader for the 'ref' feature. | |
| LayerFeatureValueReader | layerReader |
| Value reader for the 'layer' feature. | |
| WidthFeatureValueReader | widthReader |
| Value reader for the 'width' feature. | |
| AddressFeatureValueReader | addressReader |
| Value reader for the 'address' feature. | |
| LanesFeatureValueReader | lanesReader |
| Value reader for the 'lanes' feature. | |
| AccessFeatureValueReader | accessReader |
| Value reader for the 'lanes' feature. | |
| ColorFeatureValueReader | colorReader |
| Value reader for the 'color' feature. | |
| std::vector< double > | emptyDash |
| Empty dash array. | |
| std::vector< double > | tunnelDash |
| Dash array for drawing tunnel border. | |
| FillStyle | areaMarkStyle |
| Marker fill style for internal debugging. | |
| double | contourLabelOffset |
| Same value as in MapParameter but converted to pixel. | |
| double | contourLabelSpace |
| Same value as in MapParameter but converted to pixel. | |
| double | shieldGridSizeHoriz |
| Width of a cell for shield label placement. | |
| double | shieldGridSizeVert |
| Height of a cell for shield label placement. | |
Abstract base class of all renders (though you can always write your own renderer without inheriting from this class) It implements the general rendering algorithm. Concrete renders are implemented by implementing the abstract methods defined by this class and used as callbacks to the concrete renderer.
| using osmscout::MapPainter::WayPathDataIt = std::list<WayPathData>::iterator |
|
explicit |
|
virtual |
|
protectedvirtual |
Reimplemented in osmscout::MapPainterDirectX, osmscout::MapPainterGDI, and osmscout::MapPainterSVG.
|
protectedvirtual |
Low level drawing routines that have to be implemented by the concrete drawing engine. Some optional callbacks between individual processing steps.
Reimplemented in osmscout::MapPainterDirectX, osmscout::MapPainterGDI, and osmscout::MapPainterSVG.
|
protectedvirtual |
| bool osmscout::MapPainter::Draw | ( | const Projection & | projection, |
| const MapParameter & | parameter, | ||
| const MapData & | data ) |
| bool osmscout::MapPainter::Draw | ( | const Projection & | projection, |
| const MapParameter & | parameter, | ||
| const MapData & | data, | ||
| RenderSteps | startStep, | ||
| RenderSteps | endStep ) |
|
protectedpure virtual |
Draw the given area using the given FillStyle for the area outline.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedvirtual |
|
protectedpure virtual |
Draw the given Symbol on top of the contour of the given path.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedpure virtual |
(Optionally) fills the area with the given default color for ground. In 2D backends this just fills the given area, 3D backends might draw a sphere or an infinite plane.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedvirtual |
|
protectedpure virtual |
Draw the Icon as defined by the IconStyle at the given pixel coordinate (icon center).
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedpure virtual |
|
protectedpure virtual |
Draw simple line with the given style,the given color, the given width and the given untransformed nodes.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedpure virtual |
Draw the Symbol as defined by the SymbolStyle at the given pixel coordinate (symbol center).
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedvirtual |
Reimplemented in osmscout::MapPainterGDI, and osmscout::MapPainterSVG.
|
inlineprotected |
|
protectedpure virtual |
Returns the height of the font.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protected |
|
inlineprotected |
|
protectedvirtual |
Compute suggested label width for given parameters. It may be used by backend for layout labels with wrapping words.
|
inlineprotected |
|
protectedpure virtual |
Return true, if the icon in the IconStyle is available and can be drawn. If this method returns false, possibly a fallback (using a Symbol) will be chosen.
Icon style dimensions and iconId may be setup for later usage.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protected |
Useful global helper functions.
|
protected |
|
protected |
|
protectedpure virtual |
Register contour label
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protectedpure virtual |
Register regular label with given text at the given pixel coordinate in a style defined by the given LabelStyle.
Implemented in osmscout::MapPainterAgg, osmscout::MapPainterCairo, osmscout::MapPainterDirectX, osmscout::MapPainterGDI, osmscout::MapPainterNoOp, osmscout::MapPainterQt, and osmscout::MapPainterSVG.
|
protected |
Value reader for the 'lanes' feature.
|
protected |
Value reader for the 'address' feature.
|
protected |
Marker fill style for internal debugging.
|
protected |
|
protected |
Value reader for the 'color' feature.
|
protected |
Same value as in MapParameter but converted to pixel.
|
protected |
Same value as in MapParameter but converted to pixel.
|
protected |
Coordinate buffer.
|
protected |
|
protected |
Empty dash array.
Presets, precalculations and similar
|
protected |
Fallback styles in case they are missing for the style sheet
|
protected |
Value reader for the 'lanes' feature.
|
protected |
Value reader for the 'layer' feature.
|
protected |
Value reader for the 'alternative name' feature.
|
protected |
Value reader for the 'name' feature.
Attribute readers
|
protected |
Value reader for the 'ref' feature.
|
protected |
|
protected |
Width of a cell for shield label placement.
|
protected |
Height of a cell for shield label placement.
|
protected |
Reference to the style configuration to be used.
|
protected |
Internal coordinate transformation data structures Internal buffer for coordinate transformation from geo coordinates to display coordinates
|
protected |
Dash array for drawing tunnel border.
|
protected |
Value reader for the 'width' feature.