21 #ifndef WAY_RENDERER_HPP 22 #define WAY_RENDERER_HPP 56 cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT);
59 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
62 cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE);
70 cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER);
73 cairo_set_line_join(cr, CAIRO_LINE_JOIN_BEVEL);
76 cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND);
81 void getShieldPosition(cairo_path_t* transformedPath, std::list<FloatPoint>& positions);
93 void label(cairo_t* cr,
94 std::list<shared_ptr<Label> >& labels,
AssetCache& cache);
96 std::list<shared_ptr<Shield> >& shields,
void setLineCap(cairo_t *cr, Style::LineCap cap)
bool getTextPosition(cairo_path_t *transformedPath, int width, FloatPoint &best, double &angle)
Find the best fitting segment on a cairo path and return angle.
void stroke(cairo_t *cr, AssetCache &cache)
const cairo_matrix_t * transform
void fill(cairo_t *cr, AssetCache &cache)
const shared_ptr< Geodata > & data
Stores bounding box and style of a label that needs to be placed.
void label(cairo_t *cr, std::list< shared_ptr< Label > > &labels, AssetCache &cache)
void shield(cairo_t *cr, std::list< shared_ptr< Shield > > &shields, AssetCache &cache)
A Style stores the MapCSS properties for a single Node or Way, or a Relation of type multipolygon...
WayRenderer(const shared_ptr< Geodata > &data, WayId wid, const Style *s, const cairo_matrix_t *transform)
void setLineJoin(cairo_t *cr, Style::LineJoin join)
void addWayPath(cairo_t *cr)
This file is part of alaCarte.
void getShieldPosition(cairo_path_t *transformedPath, std::list< FloatPoint > &positions)
Find the best fitting segment on a cairo path for a shield.