libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::MapPainterNoOp Class Reference

Simple renderer that does nothing. More...

#include <MapPainterNoOp.h>

+ Inheritance diagram for osmscout::MapPainterNoOp:

Public Member Functions

bool DrawMap (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data, RenderSteps startStep=RenderSteps::FirstStep, RenderSteps endStep=RenderSteps::LastStep)
 
 MapPainterNoOp ()=default
 
 ~MapPainterNoOp () override=default
 
- Public Member Functions inherited from osmscout::MapPainter
bool Draw (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 
bool Draw (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data, RenderSteps startStep, RenderSteps endStep)
 
 MapPainter ()
 
virtual ~MapPainter ()
 

Protected Member Functions

void DrawArea (const Projection &projection, const MapParameter &parameter, const AreaData &area) override
 Draw the given area using the given FillStyle for the area outline.
 
void DrawContourSymbol (const Projection &projection, const MapParameter &parameter, const Symbol &symbol, const ContourSymbolData &data) override
 Draw the given Symbol on top of the contour of the given path.
 
void DrawGround (const Projection &projection, const MapParameter &parameter, const FillStyle &style) override
 (Optionally) fills the area with the given default color for ground.
 
void DrawIcon (const IconStyle *style, const Vertex2D &centerPos, double width, double height) override
 Draw the Icon as defined by the IconStyle at the given pixel coordinate (icon center).
 
void DrawLabels (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data) override
 
void DrawPath (const Projection &projection, const MapParameter &parameter, const Color &color, double width, const std::vector< double > &dash, LineStyle::CapStyle startCap, LineStyle::CapStyle endCap, const CoordBufferRange &coordRange) override
 Draw simple line with the given style,the given color, the given width and the given untransformed nodes.
 
void DrawSymbol (const Projection &projection, const MapParameter &parameter, const Symbol &symbol, const Vertex2D &screenPos, double scaleFactor) override
 Draw the Symbol as defined by the SymbolStyle at the given pixel coordinate (symbol center).
 
double GetFontHeight (const Projection &projection, const MapParameter &parameter, double fontSize) override
 Returns the height of the font.
 
bool HasIcon (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, IconStyle &style) override
 Return true, if the icon in the IconStyle is available and can be drawn.
 
void RegisterContourLabel (const Projection &projection, const MapParameter &parameter, const ObjectFileRef &ref, const PathLabelData &label, const LabelPath &labelPath) override
 Register contour label.
 
void RegisterRegularLabel (const Projection &projection, const MapParameter &parameter, const ObjectFileRef &ref, const std::vector< LabelData > &labels, const Vertex2D &position, double objectWidth) override
 Register regular label with given text at the given pixel coordinate in a style defined by the given LabelStyle.
 
- Protected Member Functions inherited from osmscout::MapPainter
virtual void AfterDrawingCallback (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 
virtual void AfterPreprocessingCallback (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 
virtual void BeforeDrawingCallback (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 
virtual void DrawContourLines (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 
virtual void DrawContourLines (size_t dbIndex, const Projection &projection, const MapParameter &parameter, const MapData &data)
 
virtual void DrawHillShading (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 
virtual void DrawHillShading (const StyleConfigRef &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data)
 
virtual void DrawWay (const Projection &projection, const MapParameter &parameter, const WayData &data)
 
const std::list< AreaData > & GetAreaData () const
 
double GetProjectedWidth (const Projection &projection, double minPixel, double width) const
 
double GetProjectedWidth (const Projection &projection, double width) const
 
virtual double GetProposedLabelWidth (const MapParameter &parameter, double averageCharWidth, double objectWidth, size_t stringLength)
 Compute suggested label width for given parameters.
 
const std::list< WayData > & GetWayData () const
 
bool IsVisibleArea (const Projection &projection, const GeoBox &boundingBox, double pixelOffset) const
 Useful global helper functions.
 
bool IsVisibleWay (const Projection &projection, const GeoBox &boundingBox, double pixelOffset) const
 
std::vector< OffsetRelParseLaneTurns (const LanesFeatureValue &feature) const
 
virtual void StyleSheetChanged (const Projection &projection, const MapParameter &parameter, const std::vector< MapData > &data)
 Low level drawing routines that have to be implemented by the concrete drawing engine.
 

Additional Inherited Members

- Public Types inherited from osmscout::MapPainter
using WayPathDataIt = std::list< WayPathData >::iterator
 
- Protected Attributes inherited from osmscout::MapPainter
FillStyle areaMarkStyle
 Marker fill style for internal debugging.
 
FeatureValueBuffer coastlineSegmentAttributes
 
double contourLabelOffset
 Same value as in MapParameter but converted to pixel.
 
double contourLabelSpace
 Same value as in MapParameter but converted to pixel.
 
CoordBuffer coordBuffer
 Coordinate buffer.
 
std::vector< DatabaseCacheEntrydatabaseCache
 Cache of database specific data for rendering, such as attribute readers and style config reference.
 
TextStyleRef debugLabel
 
std::vector< double > emptyDash
 Presets, precalculations and similar.
 
FillStyleRef landFill
 Fallback styles in case they are missing for the style sheet.
 
FillStyleRef seaFill
 
double shieldGridSizeHoriz
 Width of a cell for shield label placement.
 
double shieldGridSizeVert
 Height of a cell for shield label placement.
 
TransBuffer transBuffer
 Internal coordinate transformation data structures.
 
std::vector< double > tunnelDash
 Dash array for drawing tunnel border.
 

Detailed Description

Simple renderer that does nothing.

All required callback methods are implemented in one of the following ways:

  • Signal that Feature not implemented
  • Does nothing if this does not influence the rendering algorithms
  • Return some sensible default, if required

Constructor & Destructor Documentation

◆ MapPainterNoOp()

osmscout::MapPainterNoOp::MapPainterNoOp ( )
default

◆ ~MapPainterNoOp()

osmscout::MapPainterNoOp::~MapPainterNoOp ( )
overridedefault

Member Function Documentation

◆ DrawArea()

void osmscout::MapPainterNoOp::DrawArea ( const Projection projection,
const MapParameter parameter,
const AreaData area 
)
overrideprotectedvirtual

Draw the given area using the given FillStyle for the area outline.

Implements osmscout::MapPainter.

◆ DrawContourSymbol()

void osmscout::MapPainterNoOp::DrawContourSymbol ( const Projection projection,
const MapParameter parameter,
const Symbol symbol,
const ContourSymbolData data 
)
overrideprotectedvirtual

Draw the given Symbol on top of the contour of the given path.

Implements osmscout::MapPainter.

◆ DrawGround()

void osmscout::MapPainterNoOp::DrawGround ( const Projection projection,
const MapParameter parameter,
const FillStyle style 
)
overrideprotectedvirtual

(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.

Implements osmscout::MapPainter.

◆ DrawIcon()

void osmscout::MapPainterNoOp::DrawIcon ( const IconStyle style,
const Vertex2D centerPos,
double  width,
double  height 
)
overrideprotectedvirtual

Draw the Icon as defined by the IconStyle at the given pixel coordinate (icon center).

Implements osmscout::MapPainter.

◆ DrawLabels()

void osmscout::MapPainterNoOp::DrawLabels ( const Projection projection,
const MapParameter parameter,
const std::vector< MapData > &  data 
)
overrideprotectedvirtual

Implements osmscout::MapPainter.

◆ DrawMap()

bool osmscout::MapPainterNoOp::DrawMap ( const Projection projection,
const MapParameter parameter,
const std::vector< MapData > &  data,
RenderSteps  startStep = RenderSteps::FirstStep,
RenderSteps  endStep = RenderSteps::LastStep 
)

◆ DrawPath()

void osmscout::MapPainterNoOp::DrawPath ( const Projection projection,
const MapParameter parameter,
const Color color,
double  width,
const std::vector< double > &  dash,
LineStyle::CapStyle  startCap,
LineStyle::CapStyle  endCap,
const CoordBufferRange coordRange 
)
overrideprotectedvirtual

Draw simple line with the given style,the given color, the given width and the given untransformed nodes.

Implements osmscout::MapPainter.

◆ DrawSymbol()

void osmscout::MapPainterNoOp::DrawSymbol ( const Projection projection,
const MapParameter parameter,
const Symbol symbol,
const Vertex2D screenPos,
double  scaleFactor 
)
overrideprotectedvirtual

Draw the Symbol as defined by the SymbolStyle at the given pixel coordinate (symbol center).

Implements osmscout::MapPainter.

◆ GetFontHeight()

double osmscout::MapPainterNoOp::GetFontHeight ( const Projection projection,
const MapParameter parameter,
double  fontSize 
)
overrideprotectedvirtual

Returns the height of the font.

Implements osmscout::MapPainter.

References osmscout::FONT_HEIGHT_FACTOR.

◆ HasIcon()

bool osmscout::MapPainterNoOp::HasIcon ( const StyleConfig styleConfig,
const Projection projection,
const MapParameter parameter,
IconStyle style 
)
overrideprotectedvirtual

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.

Implements osmscout::MapPainter.

◆ RegisterContourLabel()

void osmscout::MapPainterNoOp::RegisterContourLabel ( const Projection projection,
const MapParameter parameter,
const ObjectFileRef ref,
const PathLabelData label,
const LabelPath labelPath 
)
overrideprotectedvirtual

Register contour label.

Implements osmscout::MapPainter.

◆ RegisterRegularLabel()

void osmscout::MapPainterNoOp::RegisterRegularLabel ( const Projection projection,
const MapParameter parameter,
const ObjectFileRef ref,
const std::vector< LabelData > &  labels,
const Vertex2D position,
double  objectWidth 
)
overrideprotectedvirtual

Register regular label with given text at the given pixel coordinate in a style defined by the given LabelStyle.

Implements osmscout::MapPainter.


The documentation for this class was generated from the following files: