alaCarte Maps
Renderer for OpenStreetMap tiles
ObjectRenderer Class Reference

#include <object_renderer.hpp>

Inheritance diagram for ObjectRenderer:
NodeRenderer RelationRenderer WayRenderer

Public Member Functions

 ObjectRenderer (const shared_ptr< Geodata > &data, const Style *s, const cairo_matrix_t *transform)
 

Protected Member Functions

void paintLine (cairo_t *cr, const std::vector< NodeId > &nodeIDs, bool reverse=false, bool connect=false) const
 This file is part of alaCarte. More...
 
void addShield (std::list< shared_ptr< Shield > > &shields, const FloatPoint &p, const cairo_text_extents_t *textSize) const
 used by node and way renderer to place a shield. More...
 
void addLabel (std::list< shared_ptr< Label > > &labels, const FloatPoint &p, const cairo_text_extents_t *textSize) const
 used by node and way renderer to place a shield. More...
 

Protected Attributes

const shared_ptr< Geodata > & data
 
const cairo_matrix_t * transform
 
const Styles
 
FloatRect bounds
 is set by addWayPath for ways or in transformLocation for nodes More...
 

Detailed Description

Definition at line 40 of file object_renderer.hpp.

Constructor & Destructor Documentation

ObjectRenderer::ObjectRenderer ( const shared_ptr< Geodata > &  data,
const Style s,
const cairo_matrix_t *  transform 
)

Definition at line 109 of file object_renderer.cpp.

Member Function Documentation

void ObjectRenderer::addLabel ( std::list< shared_ptr< Label > > &  labels,
const FloatPoint p,
const cairo_text_extents_t *  textSize 
) const
protected

used by node and way renderer to place a shield.

Parameters
ppoint at the center of the shield

Definition at line 97 of file object_renderer.cpp.

void ObjectRenderer::addShield ( std::list< shared_ptr< Shield > > &  shields,
const FloatPoint p,
const cairo_text_extents_t *  textSize 
) const
protected

used by node and way renderer to place a shield.

Parameters
ppoint at the center of the shield

Definition at line 75 of file object_renderer.cpp.

void ObjectRenderer::paintLine ( cairo_t *  cr,
const std::vector< NodeId > &  nodeIDs,
bool  reverse = false,
bool  connect = false 
) const
protected

This file is part of alaCarte.

alaCarte is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

alaCarte is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with alaCarte. If not, see http://www.gnu.org/licenses/.

Copyright alaCarte 2012-2013 Simon Dreher, Florian Jacob, Tobias Kahlert, Patrick Niklaus, Bernhard Scheirle, Lisa Winter0 Maintainer: Patrick Niklaus Adds the path of the given way to current path, if path is not set it creates it form the data

Parameters
reversepaint the path in reverse order (used by relations)
connectto the last current point on the context (set by relations)

Definition at line 40 of file object_renderer.cpp.

Member Data Documentation

FloatRect ObjectRenderer::bounds
protected

is set by addWayPath for ways or in transformLocation for nodes

Definition at line 47 of file object_renderer.hpp.

const shared_ptr<Geodata>& ObjectRenderer::data
protected

Definition at line 43 of file object_renderer.hpp.

const Style* ObjectRenderer::s
protected

Definition at line 45 of file object_renderer.hpp.

const cairo_matrix_t* ObjectRenderer::transform
protected

Definition at line 44 of file object_renderer.hpp.


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