diff --git a/benchmark/test_font_registration.cpp b/benchmark/test_font_registration.cpp index 749f12232..0fd9f8d29 100644 --- a/benchmark/test_font_registration.cpp +++ b/benchmark/test_font_registration.cpp @@ -24,4 +24,4 @@ public: } }; -BENCHMARK(test,"font registration") \ No newline at end of file +BENCHMARK(test,"font registration") diff --git a/benchmark/test_png_encoding1.cpp b/benchmark/test_png_encoding1.cpp index 9c1005ef7..f6fc5a229 100644 --- a/benchmark/test_png_encoding1.cpp +++ b/benchmark/test_png_encoding1.cpp @@ -1,6 +1,5 @@ #include "bench_framework.hpp" #include -#include class test : public benchmark::test_case { diff --git a/benchmark/test_polygon_clipping.cpp b/benchmark/test_polygon_clipping.cpp index ad3dd3a75..dbc8701ce 100644 --- a/benchmark/test_polygon_clipping.cpp +++ b/benchmark/test_polygon_clipping.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/benchmark/test_polygon_clipping_rendering.cpp b/benchmark/test_polygon_clipping_rendering.cpp index 0de0bb631..396cca1d8 100644 --- a/benchmark/test_polygon_clipping_rendering.cpp +++ b/benchmark/test_polygon_clipping_rendering.cpp @@ -1,7 +1,6 @@ #include "bench_framework.hpp" #include #include -#include #include #include diff --git a/benchmark/test_rendering.cpp b/benchmark/test_rendering.cpp index c82b1a30d..b98705638 100644 --- a/benchmark/test_rendering.cpp +++ b/benchmark/test_rendering.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/benchmark/test_rendering_shared_map.cpp b/benchmark/test_rendering_shared_map.cpp index 0c94b910c..df95db853 100644 --- a/benchmark/test_rendering_shared_map.cpp +++ b/benchmark/test_rendering_shared_map.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include diff --git a/bindings/python/mapnik_image.cpp b/bindings/python/mapnik_image.cpp index d0e2abdf0..a85d0c149 100644 --- a/bindings/python/mapnik_image.cpp +++ b/bindings/python/mapnik_image.cpp @@ -35,14 +35,12 @@ #pragma GCC diagnostic pop // mapnik -#include #include #include -#include -#include #include #include #include +#include // cairo #if defined(HAVE_CAIRO) && defined(HAVE_PYCAIRO) @@ -52,7 +50,6 @@ #include #endif -using mapnik::image; using mapnik::image_data_any; using mapnik::image_reader; using mapnik::get_image_reader; @@ -250,21 +247,6 @@ std::shared_ptr from_cairo(PycairoSurface* py_surface) } #endif -// ============ image any -std::shared_ptr read_from_file_impl(std::string const& filename) -{ - std::shared_ptr img = std::make_shared(); - std::unique_ptr reader(get_image_reader(filename)); - if (reader) - { - unsigned w = reader->width(); - unsigned h = reader->height(); - img->set_data(reader->read(0, 0, w, h)); - } - return img; -} -// ========================= - void export_image() { using namespace boost::python; @@ -308,14 +290,6 @@ void export_image() .value("divide", mapnik::divide) ; - class_, boost::noncopyable > ("ImageAny", "This class represents an any Image object", no_init) - .def("width",&image::width) - .def("height",&image::height) - .def("open", &read_from_file_impl) - .staticmethod("open") - .def("save",&image::save_to_file) - ; - class_, boost::noncopyable >("Image","This class represents a 32 bit RGBA image.",init()) .def("width",&image_data_any::width) .def("height",&image_data_any::height) diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index 89e92519d..b285185bf 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -99,7 +99,6 @@ void export_logger(); #include #include #include -#include #include #include #include diff --git a/bindings/python/mapnik_symbolizer.cpp b/bindings/python/mapnik_symbolizer.cpp index ef23bdb98..2f4929229 100644 --- a/bindings/python/mapnik_symbolizer.cpp +++ b/bindings/python/mapnik_symbolizer.cpp @@ -43,7 +43,6 @@ #include #include "mapnik_enumeration.hpp" #include "mapnik_svg.hpp" -#include #include #include #include // for known_svg_prefix_ diff --git a/demo/c++/rundemo.cpp b/demo/c++/rundemo.cpp index dc3592b73..f30bee2b9 100644 --- a/demo/c++/rundemo.cpp +++ b/demo/c++/rundemo.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/demo/viewer/mapwidget.cpp b/demo/viewer/mapwidget.cpp index 1c68eccde..8c389811e 100644 --- a/demo/viewer/mapwidget.cpp +++ b/demo/viewer/mapwidget.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include diff --git a/include/mapnik/graphics.hpp b/include/mapnik/graphics.hpp deleted file mode 100644 index 9030cc5d5..000000000 --- a/include/mapnik/graphics.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2014 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_GRAPHICS_HPP -#define MAPNIK_GRAPHICS_HPP - -// mapnik -#include -#include -#include -#include -#include -#include - -// stl -#include -#include -#include - -// boost -#include - -namespace mapnik -{ - -class MAPNIK_DECL image_32 -{ -private: - image_data_rgba8 data_; - bool painted_; -public: - using pixel_type = typename image_data_rgba8::pixel_type; - image_32(int width,int height); - image_32(image_32 const& rhs); - image_32(image_data_rgba8 && data); - ~image_32(); - - void painted(bool painted) - { - data_.painted(painted); - } - - bool painted() const - { - return data_.painted(); - } - - inline const image_data_rgba8& data() const - { - return data_; - } - - inline image_data_rgba8& data() - { - return data_; - } - - inline const unsigned char* raw_data() const - { - return data_.getBytes(); - } - - inline unsigned char* raw_data() - { - return data_.getBytes(); - } - - inline image_view_rgba8 get_view(unsigned x,unsigned y, unsigned w,unsigned h) - { - return image_view_rgba8(x,y,w,h,data_); - } - -public: - inline unsigned width() const - { - return data_.width(); - } - - inline unsigned height() const - { - return data_.height(); - } - -}; -} - -#endif // MAPNIK_GRAPHICS_HPP diff --git a/include/mapnik/image.hpp b/include/mapnik/image.hpp deleted file mode 100644 index d9ee28334..000000000 --- a/include/mapnik/image.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2014 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_HPP -#define MAPNIK_IMAGE_HPP - -#include -#include - -namespace mapnik { - -class MAPNIK_DECL image -{ -public: - image() = default; - inline std::size_t width() const { return data_.width(); } - inline std::size_t height() const { return data_.height(); } - void set_data(image_data_any && data); - inline image_data_any const& data() const { return data_;} - static image read_from_file(std::string const& filename); - void save_to_file(std::string const& filename, std::string const& format); -private: - image(image && other) = default; - image(image_data_any && data) noexcept; - image_data_any data_; -}; - -} - -#endif // MAPNIK_IMAGE_HPP diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index d2683e115..5cfc4e2d4 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index d16816f61..ad2677113 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -22,7 +22,6 @@ // mapnik #include -#include #include #include #include diff --git a/src/agg/process_debug_symbolizer.cpp b/src/agg/process_debug_symbolizer.cpp index be3e6d9e7..76f425792 100644 --- a/src/agg/process_debug_symbolizer.cpp +++ b/src/agg/process_debug_symbolizer.cpp @@ -23,7 +23,6 @@ // mapnik #include #include -#include #include #include #include diff --git a/src/agg/process_dot_symbolizer.cpp b/src/agg/process_dot_symbolizer.cpp index 7fe40a818..5de5e1501 100644 --- a/src/agg/process_dot_symbolizer.cpp +++ b/src/agg/process_dot_symbolizer.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/agg/process_line_pattern_symbolizer.cpp b/src/agg/process_line_pattern_symbolizer.cpp index cdace38c6..957fbe33a 100644 --- a/src/agg/process_line_pattern_symbolizer.cpp +++ b/src/agg/process_line_pattern_symbolizer.cpp @@ -23,7 +23,6 @@ // mapnik #include #include -#include #include #include #include diff --git a/src/agg/process_line_symbolizer.cpp b/src/agg/process_line_symbolizer.cpp index 3904f5f83..744dafd6b 100644 --- a/src/agg/process_line_symbolizer.cpp +++ b/src/agg/process_line_symbolizer.cpp @@ -22,7 +22,6 @@ // mapnik #include -#include #include #include #include diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index 7c1dd695e..6814c380d 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -21,7 +21,6 @@ *****************************************************************************/ // mapnik -#include #include #include #include diff --git a/src/agg/process_polygon_pattern_symbolizer.cpp b/src/agg/process_polygon_pattern_symbolizer.cpp index 52632c17c..79f5f5b68 100644 --- a/src/agg/process_polygon_pattern_symbolizer.cpp +++ b/src/agg/process_polygon_pattern_symbolizer.cpp @@ -23,7 +23,6 @@ // mapnik #include #include -#include #include #include #include diff --git a/src/agg/process_polygon_symbolizer.cpp b/src/agg/process_polygon_symbolizer.cpp index 7cebc05fb..d49b82be9 100644 --- a/src/agg/process_polygon_symbolizer.cpp +++ b/src/agg/process_polygon_symbolizer.cpp @@ -26,7 +26,6 @@ // mapnik #include #include -#include #include #include #include diff --git a/src/agg/process_raster_symbolizer.cpp b/src/agg/process_raster_symbolizer.cpp index c3927ae93..907ff67f8 100644 --- a/src/agg/process_raster_symbolizer.cpp +++ b/src/agg/process_raster_symbolizer.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/agg/process_shield_symbolizer.cpp b/src/agg/process_shield_symbolizer.cpp index ee9c14657..6c01aaaa9 100644 --- a/src/agg/process_shield_symbolizer.cpp +++ b/src/agg/process_shield_symbolizer.cpp @@ -23,7 +23,6 @@ // mapnik #include #include -#include #include #include #include diff --git a/src/agg/process_text_symbolizer.cpp b/src/agg/process_text_symbolizer.cpp index 0edb97986..217cc1870 100644 --- a/src/agg/process_text_symbolizer.cpp +++ b/src/agg/process_text_symbolizer.cpp @@ -23,7 +23,6 @@ // mapnik #include #include -#include #include #include #include diff --git a/src/build.py b/src/build.py index 0103aa8a8..953ce6c2c 100644 --- a/src/build.py +++ b/src/build.py @@ -152,7 +152,6 @@ source = Split( miniz_png.cpp color.cpp conversions.cpp - image.cpp image_convert.cpp image_compositing.cpp image_scaling.cpp @@ -172,7 +171,6 @@ source = Split( font_set.cpp function_call.cpp gradient.cpp - graphics.cpp parse_path.cpp image_reader.cpp cairo_io.cpp diff --git a/src/feature_style_processor.cpp b/src/feature_style_processor.cpp index a06cd4f29..8f6babee0 100644 --- a/src/feature_style_processor.cpp +++ b/src/feature_style_processor.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #if defined(GRID_RENDERER) diff --git a/src/graphics.cpp b/src/graphics.cpp deleted file mode 100644 index 48664835b..000000000 --- a/src/graphics.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2014 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 - * - *****************************************************************************/ - -// mapnik -#include -#include -#include -#include -#include - -// agg -#include "agg_rendering_buffer.h" -#include "agg_pixfmt_rgba.h" -#include "agg_color_rgba.h" - -#ifdef HAVE_CAIRO -#include -#endif - -namespace mapnik -{ -image_32::image_32(int width,int height) - : data_(width,height), - painted_(false) {} - - -image_32::image_32(image_32 const& rhs) - : data_(rhs.data_), - painted_(rhs.painted_) {} - -image_32::image_32(image_data_rgba8 && data) - : data_(std::move(data)), - painted_(false) {} - -image_32::~image_32() {} - -} diff --git a/src/image.cpp b/src/image.cpp deleted file mode 100644 index 6e71b80c9..000000000 --- a/src/image.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2014 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 - * - *****************************************************************************/ - -#include -#include -#include -#include - -#include - -namespace mapnik { - -image::image(image_data_any && data) noexcept - : data_(std::move(data)) {} - -void image::set_data(image_data_any && data) -{ - data_ = std::move(data); -} - -image image::read_from_file(std::string const& filename) -{ - std::unique_ptr reader(get_image_reader(filename)); - if (reader) - { - unsigned w = reader->width(); - unsigned h = reader->height(); - image_data_any data = reader->read(0, 0, w, h); - return image(std::move(data)); - } - else - { - return image(); - } -} - -void image::save_to_file(std::string const& filename, std::string const& format) -{ - mapnik::save_to_file(data_, filename, format); -} - -} diff --git a/src/text/renderer.cpp b/src/text/renderer.cpp index 6d8ce6781..bf400cd7f 100644 --- a/src/text/renderer.cpp +++ b/src/text/renderer.cpp @@ -22,7 +22,6 @@ // mapnik #include -#include #include #include #include diff --git a/tests/cpp_tests/exceptions_test.cpp b/tests/cpp_tests/exceptions_test.cpp index 3019ab86a..38e742344 100644 --- a/tests/cpp_tests/exceptions_test.cpp +++ b/tests/cpp_tests/exceptions_test.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/cpp_tests/fontset_runtime_test.cpp b/tests/cpp_tests/fontset_runtime_test.cpp index 80d7ff907..9c6c883d9 100644 --- a/tests/cpp_tests/fontset_runtime_test.cpp +++ b/tests/cpp_tests/fontset_runtime_test.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/cpp_tests/image_io_test.cpp b/tests/cpp_tests/image_io_test.cpp index b02633272..f275b0665 100644 --- a/tests/cpp_tests/image_io_test.cpp +++ b/tests/cpp_tests/image_io_test.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/tests/cpp_tests/image_painted_test.cpp b/tests/cpp_tests/image_painted_test.cpp index 3e89b819e..b3cbc8238 100644 --- a/tests/cpp_tests/image_painted_test.cpp +++ b/tests/cpp_tests/image_painted_test.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/cpp_tests/map_request_test.cpp b/tests/cpp_tests/map_request_test.cpp index 227c8ae79..b9f5210bc 100644 --- a/tests/cpp_tests/map_request_test.cpp +++ b/tests/cpp_tests/map_request_test.cpp @@ -7,7 +7,6 @@ #if defined(HAVE_CAIRO) #include #endif -#include #include #include #include diff --git a/tests/cxx/test_main.cpp b/tests/cxx/test_main.cpp index 063e87874..0c7c351f4 100644 --- a/tests/cxx/test_main.cpp +++ b/tests/cxx/test_main.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" \ No newline at end of file +#include "catch.hpp" diff --git a/utils/nik2img/nik2img.cpp b/utils/nik2img/nik2img.cpp index ccdb78208..8a9976248 100644 --- a/utils/nik2img/nik2img.cpp +++ b/utils/nik2img/nik2img.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/utils/svg2png/svg2png.cpp b/utils/svg2png/svg2png.cpp index 3473c52e9..4913c1a7e 100644 --- a/utils/svg2png/svg2png.cpp +++ b/utils/svg2png/svg2png.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include