From 294b10229ecbb8b110a8956186c017f5ad41c8dc Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 16 Apr 2013 19:09:40 -0700 Subject: [PATCH] disable the hsla image-filter - not yet ready for primetime --- include/mapnik/image_filter.hpp | 2 ++ include/mapnik/image_filter_grammar.hpp | 4 ++-- include/mapnik/image_filter_types.hpp | 6 +++++- src/image_filter_grammar.cpp | 6 ++++-- tests/visual_tests/test.py | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp index 18094ce26..c11bd2e66 100644 --- a/include/mapnik/image_filter.hpp +++ b/include/mapnik/image_filter.hpp @@ -483,6 +483,7 @@ void apply_filter(Src & src, colorize_alpha const& op) } } +/* template void apply_filter(Src & src, hsla const& transform) { @@ -572,6 +573,7 @@ void apply_filter(Src & src, hsla const& transform) } } } +*/ template void apply_filter(Src & src, gray const& op) diff --git a/include/mapnik/image_filter_grammar.hpp b/include/mapnik/image_filter_grammar.hpp index e2f194923..4f4523278 100644 --- a/include/mapnik/image_filter_grammar.hpp +++ b/include/mapnik/image_filter_grammar.hpp @@ -67,8 +67,8 @@ struct image_filter_grammar : qi::rule start; qi::rule filter; qi::rule, void(ContType&), qi::ascii::space_type> agg_blur_filter; - qi::rule, - void(ContType&), qi::ascii::space_type> hsla_filter; + //qi::rule, + // void(ContType&), qi::ascii::space_type> hsla_filter; qi::rule, void(ContType&), qi::ascii::space_type> colorize_alpha_filter; qi::rule no_args; qi::uint_parser< unsigned, 10, 1, 3 > radius_; diff --git a/include/mapnik/image_filter_types.hpp b/include/mapnik/image_filter_types.hpp index dc5728b15..d464a30ce 100644 --- a/include/mapnik/image_filter_types.hpp +++ b/include/mapnik/image_filter_types.hpp @@ -54,6 +54,7 @@ struct agg_stack_blur unsigned ry; }; +/* struct hsla { hsla(double _h0, double _h1, @@ -97,6 +98,7 @@ struct hsla double a0; double a1; }; +*/ struct color_stop { @@ -122,7 +124,7 @@ typedef boost::variant filter_type; inline std::ostream& operator<< (std::ostream& os, blur) @@ -143,6 +145,7 @@ inline std::ostream& operator<< (std::ostream& os, agg_stack_blur const& filter) return os; } +/* inline std::ostream& operator<< (std::ostream& os, hsla const& filter) { os << "hsla(" << filter.h0 << 'x' << filter.h1 << ':' @@ -151,6 +154,7 @@ inline std::ostream& operator<< (std::ostream& os, hsla const& filter) << filter.a0 << 'x' << filter.a1 << ')'; return os; } +*/ inline std::ostream& operator<< (std::ostream& os, emboss) { diff --git a/src/image_filter_grammar.cpp b/src/image_filter_grammar.cpp index 2d91587fc..b50807129 100644 --- a/src/image_filter_grammar.cpp +++ b/src/image_filter_grammar.cpp @@ -88,8 +88,8 @@ image_filter_grammar::image_filter_grammar() | agg_blur_filter(_val) | - hsla_filter(_val) - | + //hsla_filter(_val) + //| colorize_alpha_filter(_val) ; @@ -100,6 +100,7 @@ image_filter_grammar::image_filter_grammar() [push_back(_r1,construct(_a,_b))] ; + /* hsla_filter = lit("hsla") >> lit('(') >> double_[_a = _1] >> lit('x') >> double_[_b = _1] >> lit(';') @@ -108,6 +109,7 @@ image_filter_grammar::image_filter_grammar() >> double_[_g = _1] >> lit('x') >> double_[_h = _1] >> lit(')') [push_back(_r1, construct(_a,_b,_c,_d,_e,_f,_g,_h))] ; + */ colorize_alpha_filter = lit("colorize-alpha")[_a = construct()] >> lit('(') diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index 3919a7113..c28c4495e 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -53,7 +53,7 @@ files = [ {'name': "marker-on-line-spacing-eq-width-overlap", 'sizes':[(600,400)]}, {'name': "marker_line_placement_on_points"}, {'name': "marker-with-background-image", 'sizes':[(600,400),(400,600),(257,256)]}, - {'name': "marker-with-background-image-and-hsla-transform", 'sizes':[(600,400),(400,600),(257,256)]}, + #{'name': "marker-with-background-image-and-hsla-transform", 'sizes':[(600,400),(400,600),(257,256)]}, {'name': "marker-on-hex-grid", 'sizes':[(600,400),(400,600),(257,256)]}, {'name': "whole-centroid", 'sizes':[(600,400)], 'bbox': mapnik.Box2d(736908, 4390316, 2060771, 5942346)},