mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
+ output image-filters and direct-image-filters
This commit is contained in:
parent
db2bd535de
commit
216768fbc0
@ -33,7 +33,7 @@
|
||||
#include <mapnik/text_placements/dummy.hpp>
|
||||
#include <mapnik/image_compositing.hpp>
|
||||
#include <mapnik/image_scaling.hpp>
|
||||
|
||||
#include <mapnik/image_filter_types.hpp>
|
||||
// boost
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
@ -556,6 +556,26 @@ void serialize_style( ptree & map_node, Map::const_style_iterator style_it, bool
|
||||
set_attr(style_node, "comp-op", "src-over");
|
||||
}
|
||||
|
||||
if (style.image_filters().size() > 0)
|
||||
{
|
||||
std::string filters_str;
|
||||
std::back_insert_iterator<std::string> sink(filters_str);
|
||||
if (generate_image_filters(sink, style.image_filters()))
|
||||
{
|
||||
set_attr(style_node, "image-filters", filters_str);
|
||||
}
|
||||
}
|
||||
|
||||
if (style.direct_image_filters().size() > 0)
|
||||
{
|
||||
std::string filters_str;
|
||||
std::back_insert_iterator<std::string> sink(filters_str);
|
||||
if (generate_image_filters(sink, style.direct_image_filters()))
|
||||
{
|
||||
set_attr(style_node, "direct-image-filters", filters_str);
|
||||
}
|
||||
}
|
||||
|
||||
rules::const_iterator it = style.get_rules().begin();
|
||||
rules::const_iterator end = style.get_rules().end();
|
||||
for (; it != end; ++it)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user