libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::MapPainterQt Class Reference

#include <libosmscout-map-qt/include/osmscoutmapqt/MapPainterQt.h>

Inheritance diagram for osmscout::MapPainterQt:
Collaboration diagram for osmscout::MapPainterQt:

Public Member Functions

 MapPainterQt (const StyleConfigRef &styleConfig)
 ~MapPainterQt () override
void DrawGroundTiles (const Projection &projection, const MapParameter &parameter, const std::list< GroundTile > &groundTiles, QPainter *painter)
bool DrawMap (const Projection &projection, const MapParameter &parameter, const MapData &data, QPainter *painter, RenderSteps startStep=RenderSteps::FirstStep, RenderSteps endStep=RenderSteps::LastStep)
Public Member Functions inherited from osmscout::MapPainter
 MapPainter (const StyleConfigRef &styleConfig)
virtual ~MapPainter ()
bool Draw (const Projection &projection, const MapParameter &parameter, const MapData &data, RenderSteps startStep, RenderSteps endStep)
bool Draw (const Projection &projection, const MapParameter &parameter, const MapData &data)

Protected Member Functions

bool HasIcon (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, IconStyle &style) override
bool HasPattern (const Projection &projection, const MapParameter &parameter, const FillStyle &style)
double GetFontHeight (const Projection &projection, const MapParameter &parameter, double fontSize) override
void DrawGround (const Projection &projection, const MapParameter &parameter, const FillStyle &style) override
void DrawLabel (const Projection &projection, const MapParameter &parameter, const ScreenVectorRectangle &labelRectangle, const LabelData &label, const QTextLayout &textLayout)
void BeforeDrawing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data) override
void RegisterRegularLabel (const Projection &projection, const MapParameter &parameter, const ObjectFileRef &ref, const std::vector< LabelData > &labels, const Vertex2D &position, double objectWidth) override
void RegisterContourLabel (const Projection &projection, const MapParameter &parameter, const ObjectFileRef &ref, const PathLabelData &label, const LabelPath &labelPath) override
void DrawLabels (const Projection &projection, const MapParameter &parameter, const MapData &data) override
void DrawIcon (const IconStyle *style, const Vertex2D &centerPos, double width, double height) override
void DrawSymbol (const Projection &projection, const MapParameter &parameter, const Symbol &symbol, const Vertex2D &screenPos, double scaleFactor) 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
void DrawContourSymbol (const Projection &projection, const MapParameter &parameter, const Symbol &symbol, const ContourSymbolData &data) override
void DrawArea (const Projection &projection, const MapParameter &parameter, const AreaData &area) override
Protected Member Functions inherited from osmscout::MapPainter
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 &parameter, const MapData &data)
virtual void AfterDrawing (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const MapData &data)
virtual void DrawContourLines (const Projection &projection, const MapParameter &parameter, const MapData &data)
virtual void DrawHillShading (const Projection &projection, const MapParameter &parameter, const MapData &data)
virtual double GetProposedLabelWidth (const MapParameter &parameter, double averageCharWidth, double objectWidth, size_t stringLength)
virtual void DrawWay (const StyleConfig &styleConfig, const Projection &projection, const MapParameter &parameter, const WayData &data)
std::vector< OffsetRelParseLaneTurns (const LanesFeatureValue &feature) const

Friends

class BatchMapPainterQt

Additional Inherited Members

Public Types inherited from osmscout::MapPainter
using WayPathDataIt = std::list<WayPathData>::iterator
Protected Attributes inherited from osmscout::MapPainter
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.

Detailed Description

Implementation of MapPainter for Qt

Constructor & Destructor Documentation

◆ MapPainterQt()

osmscout::MapPainterQt::MapPainterQt ( const StyleConfigRef & styleConfig)
explicit

◆ ~MapPainterQt()

osmscout::MapPainterQt::~MapPainterQt ( )
override

Member Function Documentation

◆ BeforeDrawing()

void osmscout::MapPainterQt::BeforeDrawing ( const StyleConfig & styleConfig,
const Projection & projection,
const MapParameter & parameter,
const MapData & data )
overrideprotectedvirtual

Reimplemented from osmscout::MapPainter.

◆ DrawArea()

void osmscout::MapPainterQt::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::MapPainterQt::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::MapPainterQt::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.

◆ DrawGroundTiles()

void osmscout::MapPainterQt::DrawGroundTiles ( const Projection & projection,
const MapParameter & parameter,
const std::list< GroundTile > & groundTiles,
QPainter * painter )

◆ DrawIcon()

void osmscout::MapPainterQt::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.

◆ DrawLabel()

void osmscout::MapPainterQt::DrawLabel ( const Projection & projection,
const MapParameter & parameter,
const ScreenVectorRectangle & labelRectangle,
const LabelData & label,
const QTextLayout & textLayout )
protected

◆ DrawLabels()

void osmscout::MapPainterQt::DrawLabels ( const Projection & projection,
const MapParameter & parameter,
const MapData & data )
overrideprotectedvirtual

Implements osmscout::MapPainter.

◆ DrawMap()

bool osmscout::MapPainterQt::DrawMap ( const Projection & projection,
const MapParameter & parameter,
const MapData & data,
QPainter * painter,
RenderSteps startStep = RenderSteps::FirstStep,
RenderSteps endStep = RenderSteps::LastStep )

◆ DrawPath()

void osmscout::MapPainterQt::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::MapPainterQt::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::MapPainterQt::GetFontHeight ( const Projection & projection,
const MapParameter & parameter,
double fontSize )
overrideprotectedvirtual

Returns the height of the font.

Implements osmscout::MapPainter.

◆ HasIcon()

bool osmscout::MapPainterQt::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.

◆ HasPattern()

bool osmscout::MapPainterQt::HasPattern ( const Projection & projection,
const MapParameter & parameter,
const FillStyle & style )
protected

◆ RegisterContourLabel()

void osmscout::MapPainterQt::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::MapPainterQt::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.

◆ BatchMapPainterQt

friend class BatchMapPainterQt
friend

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