From 9ba04738d6fe06e079d72da7e2c3d83998518863 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Fri, 4 May 2012 10:23:49 +0100 Subject: [PATCH] + don't expose agg headers --- include/mapnik/feature_type_style.hpp | 2 +- include/mapnik/image_filter.hpp | 35 ++------------- include/mapnik/image_filter_types.hpp | 62 +++++++++++++++++++++++++++ src/agg/agg_renderer.cpp | 2 +- 4 files changed, 67 insertions(+), 34 deletions(-) create mode 100644 include/mapnik/image_filter_types.hpp diff --git a/include/mapnik/feature_type_style.hpp b/include/mapnik/feature_type_style.hpp index e6876fa0c..0230c0517 100644 --- a/include/mapnik/feature_type_style.hpp +++ b/include/mapnik/feature_type_style.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include // boost #include diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp index 79b656069..8988b2ccf 100644 --- a/include/mapnik/image_filter.hpp +++ b/include/mapnik/image_filter.hpp @@ -24,10 +24,11 @@ #ifndef MAPNIK_IMAGE_FILTER_HPP #define MAPNIK_IMAGE_FILTER_HPP +//mapnik +#include +// boost #include -#include #include - // agg #include "agg_basics.h" #include "agg_rendering_buffer.h" @@ -122,24 +123,6 @@ static const float edge_detect_matrix[] = {0,1,0,1,-4,1,0,1,0 }; } -struct blur {}; -struct emboss {}; -struct sharpen {}; -struct edge_detect {}; -struct sobel {}; - -struct agg_stack_blur -{ - agg_stack_blur(unsigned rx_, unsigned ry_) - : rx(rx_),ry(ry_) {} - unsigned rx; - unsigned ry; -}; - -struct gray {}; -struct x_gradient {}; -struct y_gradient {}; -struct invert {}; template void process_channel_impl (Src const& src, Dst & dst, Conv const& k) @@ -381,18 +364,6 @@ void apply_filter(Src & src, invert) } } -typedef boost::variant filter_type; - - template struct filter_visitor : boost::static_visitor { diff --git a/include/mapnik/image_filter_types.hpp b/include/mapnik/image_filter_types.hpp new file mode 100644 index 000000000..ff105acac --- /dev/null +++ b/include/mapnik/image_filter_types.hpp @@ -0,0 +1,62 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2012 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#ifndef MAPNIK_IMAGE_FILTER_TYPES_HPP +#define MAPNIK_IMAGE_FILTER_TYPES_HPP + +#include + +namespace mapnik { namespace filter { + +struct blur {}; +struct emboss {}; +struct sharpen {}; +struct edge_detect {}; +struct sobel {}; +struct gray {}; +struct x_gradient {}; +struct y_gradient {}; +struct invert {}; + +struct agg_stack_blur +{ + agg_stack_blur(unsigned rx_, unsigned ry_) + : rx(rx_),ry(ry_) {} + unsigned rx; + unsigned ry; +}; + + +typedef boost::variant filter_type; + +}} + +#endif // MAPNIK_IMAGE_FILTER_TYPES_HPP diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index 4edf4da23..2c1a19821 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -34,7 +34,7 @@ #include #include #include - +#include // agg #define AGG_RENDERING_BUFFER row_ptr_cache #include "agg_rendering_buffer.h"