23 #include <boost/algorithm/string/replace.hpp> 24 #include <boost/filesystem/operations.hpp> 34 #define OVERMERGE_IMPL(_attr) if (templ-> _attr) { \ 35 templ-> _attr ->overwrite(obj, &(this-> _attr )); \ 93 this->
icon_image = (stylesheet->getPath().parent_path() / boost::filesystem::path(this->
icon_image.
str())).string();
111 this->
image = (stylesheet->getPath().parent_path() / boost::filesystem::path(this->
image.
str())).string();
112 if (!boost::filesystem::exists(this->
image.
str())) {
120 this->
fill_image = (stylesheet->getPath().parent_path() / boost::filesystem::path(this->
fill_image.
str())).string();
127 if (this->
dashes.size()) {
129 bool negative =
false;
130 for (
double d : this->
dashes) {
133 }
else if (d < 0.0) {
138 if (zero || negative)
139 this->dashes.
clear();
144 bool negative =
false;
148 }
else if (d < 0.0) {
153 if (zero || negative)
154 this->casing_dashes.clear();
157 if (!associatedObject)
164 if (entry != associatedObject->
getTags().end()) {
165 this->
text = entry->second.
str();
176 if (entry != associatedObject->
getTags().end()) {
185 if (entry != associatedObject->
getTags().end()) {
186 std::stringstream strstream(entry->second.str());
190 if (!strstream.bad()) {
218 linecap = Style::LineCap::CAP_NONE;
219 linejoin = Style::LineJoin::JOIN_MITER;
MaybeCachedString shield_text
void finish(GeoObject *associatedObject, shared_ptr< const Stylesheet > stylesheet)
Performs finishing operations on the style, like resolve tags for texts or check for icon path existe...
float shield_casing_width
TESTABLE void overmerge(GeoObject *obj, const shared_ptr< StyleTemplate > &style)
Takes all non-"null" (meaning only properties that were explicitely set) properties from the given St...
TESTABLE const DataMap< CachedString, CachedString > & getTags() const
Returns a map with key-to-tag-mapping for osm-tags.
const string & str() const
Returns the internal string.
MaybeCachedString fill_image
MaybeCachedString font_family
Color shield_casing_color
#define OVERMERGE_IMPL(_attr)
This file is part of alaCarte.
MaybeCachedString shield_image
std::vector< double > casing_dashes
MaybeCachedString icon_image
TextPosition text_position
std::vector< double > dashes
void clear()
Sets this string to be the empty string.
CachedString precached_layer("layer")