23 #include <boost/unordered_map.hpp> 41 const std::vector<NodeId>& nodeIDs,
42 bool reverse,
bool connect)
const 49 int size = nodeIDs.size();
50 for (
int i = 0; i < size; i++)
54 nid = nodeIDs[size - 1 - i];
57 n =
data->getNode(nid);
60 if (first && !connect)
61 cairo_move_to(cr, p.
x, p.
y);
63 cairo_line_to(cr, p.
x, p.
y);
77 const cairo_text_extents_t* textSize)
const 80 double x = floor(p.
x - textSize->width / 2.0);
81 double y = floor(p.
y - textSize->height / 2.0);
84 ceil(textSize->width + 2*border),
85 ceil(textSize->height + 2*border));
89 shields.push_back(boost::make_shared<Shield>(box,
bounds,
s->
shield_text,
s, origin, shield));
99 const cairo_text_extents_t* textSize)
const 101 double x = p.
x - textSize->width/2.0;
102 double y = p.
y - textSize->height/2.0;
106 labels.push_back(boost::make_shared<Label>(box,
bounds,
s->
text,
s, origin));
112 , transform(transform)
MaybeCachedString shield_text
basic_rect< double > FloatRect
float shield_casing_width
const cairo_matrix_t * transform
const shared_ptr< Geodata > & data
A Style stores the MapCSS properties for a single Node or Way, or a Relation of type multipolygon...
TESTABLE const FixedPoint & getLocation() const
FloatRect bounds
is set by addWayPath for ways or in transformLocation for nodes
basic_rect< T > grow(T dx, T dy) const
void paintLine(cairo_t *cr, const std::vector< NodeId > &nodeIDs, bool reverse=false, bool connect=false) const
This file is part of alaCarte.
basic_vector2< double > FloatPoint
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.
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.
#define RENDERER_SHIELD_DISTANCE
This file is part of alaCarte.
ObjectRenderer(const shared_ptr< Geodata > &data, const Style *s, const cairo_matrix_t *transform)