26 #include <boost/thread/mutex.hpp> 56 TESTABLE void sliceTile(
const shared_ptr<RenderCanvas>& canvas,
const shared_ptr<MetaIdentifier>&
id,
const shared_ptr<Tile>& tile)
const;
59 void placeLabels(
const std::list<shared_ptr<Label> >& labels,
60 std::vector<shared_ptr<Label> >& placed);
61 void placeShields(
const std::list<shared_ptr<Shield> >& shields,
62 std::vector<shared_ptr<Shield> >& placed);
67 const shared_ptr<Geodata>
data;
72 void printTileId(cairo_t* cr,
const shared_ptr<TileIdentifier>&
id)
const;
78 std::vector<NodeId>& nodes, std::vector<WayId>& ways, std::vector<RelId>& relations,
79 std::list<shared_ptr<Label>>& labels, std::list<shared_ptr<Shield>>& shields,
81 template <
typename LabelType>
83 void renderShields(cairo_t* cr, std::vector<shared_ptr<Shield> >& shields)
const;
85 const shared_ptr<RenderCanvas>& canvas,
86 double width,
double height,
void paintBackground(CairoLayer &layer, const Style *canvasStyle) const
void placeLabels(const std::list< shared_ptr< Label > > &labels, std::vector< shared_ptr< Label > > &placed)
Place labels with greedy algorithm.
A RenderAttributes object contains mappings from NodeIDs and WayIDs to Style objects which define how...
void sortObjects(RenderAttributes &map, std::vector< NodeId > &nodes, std::vector< WayId > &ways, std::vector< RelId > &relations) const
Sort objetcs into painting order.
Stores bounding box and style of a label that needs to be placed.
TESTABLE void sliceTile(const shared_ptr< RenderCanvas > &canvas, const shared_ptr< MetaIdentifier > &id, const shared_ptr< Tile > &tile) const
A Style stores the MapCSS properties for a single Node or Way, or a Relation of type multipolygon...
void renderArea(const FixedRect &area, const shared_ptr< RenderCanvas > &canvas, double width, double height, RenderAttributes &map, AssetCache &cache)
void renderShields(cairo_t *cr, std::vector< shared_ptr< Shield > > &shields) const
Only renders the shield background, the text is rendered in renderLabels.
void placeShields(const std::list< shared_ptr< Shield > > &shields, std::vector< shared_ptr< Shield > > &placed)
Place labels with greedy algorithm.
const shared_ptr< Geodata > data
stores the actual data
bool isCutOff(const FloatRect &box, const FloatRect &owner)
Checks if all neighbour tile know about the owner of the label.
void renderLabels(cairo_t *cr, std::vector< shared_ptr< LabelType > > &labels, AssetCache &cache) const
void renderObjects(CairoLayer *layers, RenderAttributes &map, const cairo_matrix_t *transform, std::vector< NodeId > &nodes, std::vector< WayId > &ways, std::vector< RelId > &relations, std::list< shared_ptr< Label >> &labels, std::list< shared_ptr< Shield >> &shields, AssetCache &cache) const
Renders a OSM layer onto the given cairo surface.
void compositeLayers(CairoLayer *layers) const
Composited all layers into the first layer.
This file is part of alaCarte.
static boost::mutex renderLock
lock calls to cairo for old versions that are not thread-safe.
TESTABLE void renderEmptyTile(RenderAttributes &map, const shared_ptr< RenderCanvas > &canvas, const shared_ptr< Tile > &tile)
FloatRect neighbourRequests[8]
void printTileId(cairo_t *cr, const shared_ptr< TileIdentifier > &id) const
Debug function that prints identifier on the tile.
TESTABLE void renderMetaTile(RenderAttributes &map, const shared_ptr< RenderCanvas > &canvas, const shared_ptr< MetaIdentifier > &id)
Renderer(const shared_ptr< Geodata > &data)