libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
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 MapData &data)
 
 MapPainterNoOp (const StyleConfigRef &styleConfig)
 
- Public Member Functions inherited from osmscout::MapPainter
 MapPainter (const StyleConfigRef &styleConfig, CoordBuffer *buffer)
 
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. More...
 
void DrawContourLabel (const Projection &projection, const MapParameter &parameter, const PathTextStyle &style, const std::string &text, size_t transStart, size_t transEnd, ContourLabelHelper &helper) override
 Draw the given text as a contour of the given path in a style defined by the given LabelStyle. More...
 
void DrawContourSymbol (const Projection &projection, const MapParameter &parameter, const Symbol &symbol, double space, size_t transStart, size_t transEnd) override
 Draw the given text as a contour of the given path in a style defined by the given LabelStyle. More...
 
void DrawGround (const Projection &projection, const MapParameter &parameter, const FillStyle &style) override
 (Optionally) fills the area with the given default color for ground. More...
 
void DrawIcon (const IconStyle *style, double x, double y) override
 Draw the Icon as defined by the IconStyle at the given pixel coordinate. More...
 
void DrawLabel (const Projection &projection, const MapParameter &parameter, const LabelData &label) override
 Draw the given text at the given pixel coordinate in a style defined by the given LabelStyle. More...
 
void DrawPath (const Projection &projection, const MapParameter &parameter, const Color &color, double width, const std::vector< double > &dash, LineStyle::CapStyle startCap, LineStyle::CapStyle endCap, size_t transStart, size_t transEnd) override
 Draw simple line with the given style,the given color, the given width and the given untransformed nodes. More...
 
void DrawSymbol (const Projection &projection, const MapParameter &parameter, const Symbol &symbol, double x, double y) override
 Draw the Symbol as defined by the SymbolStyle at the given pixel coordinate. More...
 
double GetFontHeight (const Projection &projection, const MapParameter &parameter, double fontSize) override
 Returns the height of the font. More...
 
TextDimension GetTextDimension (const Projection &projection, const MapParameter &parameter, double objectWidth, double fontSize, const std::string &text) override
 Return the bounding box of the given text. More...
 
bool HasIcon (const StyleConfig &styleConfig, const MapParameter &parameter, IconStyle &style) override
 Return true, if the icon in the IconStyle is available and can be drawn. More...
 
- Protected Member Functions inherited from osmscout::MapPainter
const std::list< AreaData > & GetAreaData () const
 
virtual double GetProposedLabelWidth (const MapParameter &parameter, double averageCharWidth, double objectWidth, size_t stringLength)
 Compute suggested label width for given parameters. More...
 
const std::list< WayData > & GetWayData () const
 
bool IsVisibleArea (const Projection &projection, const GeoBox &boundingBox, double pixelOffset) const
 Useful global helper functions. More...
 
bool IsVisibleWay (const Projection &projection, const std::vector< Point > &nodes, double pixelOffset) const
 
void Transform (const Projection &projection, const MapParameter &parameter, const GeoCoord &coord, double &x, double &y)
 
double GetProjectedWidth (const Projection &projection, double minPixel, double width) const
 
double GetProjectedWidth (const Projection &projection, double width) const
 
virtual void AfterPreprocessing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data)
 Low level drawing routines that have to be implemented by the concrete drawing engine. More...
 
virtual void BeforeDrawing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data)
 
virtual void AfterDrawing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data)
 
virtual void DrawNodes (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data)
 Med level drawing routines that are already implemented by the base class, but which can be overwritten by the driver if necessary. More...
 
virtual void DrawNode (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const NodeRef &node)
 
virtual void DrawWay (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const WayData &data)
 
virtual void DrawWays (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter)
 
virtual void DrawAreas (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter)
 
bool Draw (const Projection &projection, const MapParameter &parameter, const MapData &data)
 

Additional Inherited Members

- Protected Attributes inherited from osmscout::MapPainter
CoordBuffer * coordBuffer
 Reference to the coordinate buffer. More...
 
StyleConfigRef styleConfig
 Reference to the style configuration to be used. More...
 
TransBuffer transBuffer
 Scratch variables for path optimization algorithm. More...
 
NameFeatureValueReader nameReader
 Attribute readers. More...
 
NameAltFeatureValueReader nameAltReader
 Value reader for the 'alternative name' feature. More...
 
RefFeatureValueReader refReader
 Value reader for the 'ref' feature. More...
 
LayerFeatureValueReader layerReader
 Value reader for the 'layer' feature. More...
 
WidthFeatureValueReader widthReader
 Value reader for the 'width' feature. More...
 
AddressFeatureValueReader addressReader
 Value reader for the 'address' feature. More...
 
std::vector< double > emptyDash
 Presets, precalculations and similar. More...
 
std::vector< double > tunnelDash
 Dash array for drawing tunnel border. More...
 
FillStyle areaMarkStyle
 Marker fill style for internal debugging. More...
 
double contourLabelOffset
 Same value as in MapParameter but converted to pixel. More...
 
double contourLabelSpace
 Same value as in MapParameter but converted to pixel. More...
 
double shieldGridSizeHoriz
 Width of a cell for shield label placement. More...
 
double shieldGridSizeVert
 Height of a cell for shield label placement. More...
 

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

osmscout::MapPainterNoOp::MapPainterNoOp ( const StyleConfigRef styleConfig)
explicit

Member Function Documentation

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.

void osmscout::MapPainterNoOp::DrawContourLabel ( const Projection projection,
const MapParameter &  parameter,
const PathTextStyle style,
const std::string &  text,
size_t  transStart,
size_t  transEnd,
ContourLabelHelper &  helper 
)
overrideprotectedvirtual

Draw the given text as a contour of the given path in a style defined by the given LabelStyle.

Implements osmscout::MapPainter.

void osmscout::MapPainterNoOp::DrawContourSymbol ( const Projection projection,
const MapParameter &  parameter,
const Symbol symbol,
double  space,
size_t  transStart,
size_t  transEnd 
)
overrideprotectedvirtual

Draw the given text as a contour of the given path in a style defined by the given LabelStyle.

Implements osmscout::MapPainter.

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.

void osmscout::MapPainterNoOp::DrawIcon ( const IconStyle style,
double  x,
double  y 
)
overrideprotectedvirtual

Draw the Icon as defined by the IconStyle at the given pixel coordinate.

Implements osmscout::MapPainter.

void osmscout::MapPainterNoOp::DrawLabel ( const Projection projection,
const MapParameter &  parameter,
const LabelData label 
)
overrideprotectedvirtual

Draw the given text at the given pixel coordinate in a style defined by the given LabelStyle.

Implements osmscout::MapPainter.

bool osmscout::MapPainterNoOp::DrawMap ( const Projection projection,
const MapParameter &  parameter,
const MapData &  data 
)
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,
size_t  transStart,
size_t  transEnd 
)
overrideprotectedvirtual

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

Implements osmscout::MapPainter.

void osmscout::MapPainterNoOp::DrawSymbol ( const Projection projection,
const MapParameter &  parameter,
const Symbol symbol,
double  x,
double  y 
)
overrideprotectedvirtual

Draw the Symbol as defined by the SymbolStyle at the given pixel coordinate.

Implements osmscout::MapPainter.

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.

MapPainter::TextDimension osmscout::MapPainterNoOp::GetTextDimension ( const Projection projection,
const MapParameter &  parameter,
double  objectWidth,
double  fontSize,
const std::string &  text 
)
overrideprotectedvirtual

Return the bounding box of the given text.

The method is called every time a label for a node or an area has to be drawn (which means "not for contour labels").

The backend may decide to relayout the given text (by adding virtual line breaks), however it must assure that later calls to corresponding DrawXXX methods will honour the bounding box.

Implements osmscout::MapPainter.

References osmscout::FONT_HEIGHT_FACTOR, and osmscout::FONT_WIDTH_HEIGHT_FACTOR.

bool osmscout::MapPainterNoOp::HasIcon ( const StyleConfig styleConfig,
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.

Implements osmscout::MapPainter.


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