diff --git a/benchmark/compare_images.hpp b/benchmark/compare_images.hpp index b31c62a33..80dd7e929 100644 --- a/benchmark/compare_images.hpp +++ b/benchmark/compare_images.hpp @@ -24,8 +24,8 @@ namespace benchmark { throw mapnik::image_reader_exception("Failed to load: " + src_fn); } - image_data_rgba8 const& dest = util::get(reader1->read(0,0,reader1->width(), reader1->height())); - image_data_rgba8 const& src = util::get(reader1->read(0,0,reader1->width(), reader1->height())); + image_rgba8 const& dest = util::get(reader1->read(0,0,reader1->width(), reader1->height())); + image_rgba8 const& src = util::get(reader1->read(0,0,reader1->width(), reader1->height())); unsigned int width = src.width(); unsigned int height = src.height(); diff --git a/benchmark/test_png_encoding1.cpp b/benchmark/test_png_encoding1.cpp index f6fc5a229..55d3f18af 100644 --- a/benchmark/test_png_encoding1.cpp +++ b/benchmark/test_png_encoding1.cpp @@ -3,7 +3,7 @@ class test : public benchmark::test_case { - mapnik::image_data_rgba8 im_; + mapnik::image_rgba8 im_; public: test(mapnik::parameters const& params) : test_case(params), diff --git a/benchmark/test_png_encoding2.cpp b/benchmark/test_png_encoding2.cpp index 798d0690a..640050c0d 100644 --- a/benchmark/test_png_encoding2.cpp +++ b/benchmark/test_png_encoding2.cpp @@ -3,7 +3,7 @@ class test : public benchmark::test_case { - std::shared_ptr im_; + std::shared_ptr im_; public: test(mapnik::parameters const& params) : test_case(params) { diff --git a/benchmark/test_polygon_clipping.cpp b/benchmark/test_polygon_clipping.cpp index dbc8701ce..8b72ea81d 100644 --- a/benchmark/test_polygon_clipping.cpp +++ b/benchmark/test_polygon_clipping.cpp @@ -36,7 +36,7 @@ void render(mapnik::geometry_type & geom, using path_type = mapnik::transform_path_adapter; using ren_base = agg::renderer_base; using renderer = agg::renderer_scanline_aa_solid; - mapnik::image_data_rgba8 im(256,256); + mapnik::image_rgba8 im(256,256); mapnik::fill(im, mapnik::color("white")); mapnik::box2d padded_extent = extent; padded_extent.pad(10); diff --git a/benchmark/test_polygon_clipping_rendering.cpp b/benchmark/test_polygon_clipping_rendering.cpp index 396cca1d8..88f20d5e0 100644 --- a/benchmark/test_polygon_clipping_rendering.cpp +++ b/benchmark/test_polygon_clipping_rendering.cpp @@ -21,8 +21,8 @@ public: mapnik::Map m(256,256); mapnik::load_map(m,xml_); m.zoom_to_box(extent_); - mapnik::image_data_rgba8 im(m.width(),m.height()); - mapnik::agg_renderer ren(m,im); + mapnik::image_rgba8 im(m.width(),m.height()); + mapnik::agg_renderer ren(m,im); ren.apply(); //mapnik::save_to_file(im.data(),"test.png"); return true; @@ -34,8 +34,8 @@ public: m.zoom_to_box(extent_); for (unsigned i=0;i ren(m,im); + mapnik::image_rgba8 im(m.width(),m.height()); + mapnik::agg_renderer ren(m,im); ren.apply(); } return true; diff --git a/benchmark/test_rendering.cpp b/benchmark/test_rendering.cpp index b98705638..fc7984b15 100644 --- a/benchmark/test_rendering.cpp +++ b/benchmark/test_rendering.cpp @@ -54,8 +54,8 @@ public: } else { m.zoom_all(); } - mapnik::image_data_rgba8 im(m.width(),m.height()); - mapnik::agg_renderer ren(m,im,scale_factor_); + mapnik::image_rgba8 im(m.width(),m.height()); + mapnik::agg_renderer ren(m,im,scale_factor_); ren.apply(); if (!preview_.empty()) { std::clog << "preview available at " << preview_ << "\n"; @@ -77,8 +77,8 @@ public: } for (unsigned i=0;i ren(m,im,scale_factor_); + mapnik::image_rgba8 im(m.width(),m.height()); + mapnik::agg_renderer ren(m,im,scale_factor_); ren.apply(); } return true; diff --git a/benchmark/test_rendering_shared_map.cpp b/benchmark/test_rendering_shared_map.cpp index df95db853..a83410d1b 100644 --- a/benchmark/test_rendering_shared_map.cpp +++ b/benchmark/test_rendering_shared_map.cpp @@ -49,7 +49,7 @@ class test : public benchmark::test_case std::shared_ptr m_; double scale_factor_; std::string preview_; - mutable mapnik::image_data_rgba8 im_; + mutable mapnik::image_rgba8 im_; public: test(mapnik::parameters const& params) : test_case(params), @@ -93,7 +93,7 @@ public: mapnik::projection map_proj(m_->srs(),true); double scale_denom = mapnik::scale_denominator(m_req.scale(),map_proj.is_geographic()); scale_denom *= scale_factor_; - mapnik::agg_renderer ren(*m_,m_req,variables,im_,scale_factor_); + mapnik::agg_renderer ren(*m_,m_req,variables,im_,scale_factor_); ren.start_map_processing(*m_); std::vector const& layers = m_->layers(); process_layers(ren,m_req,map_proj,layers,scale_denom); @@ -113,20 +113,20 @@ public: for (unsigned i=0;iwidth(),m_->height()); + mapnik::image_rgba8 im(m_->width(),m_->height()); mapnik::attributes variables; m_req.set_buffer_size(m_->buffer_size()); mapnik::projection map_proj(m_->srs(),true); double scale_denom = mapnik::scale_denominator(m_req.scale(),map_proj.is_geographic()); scale_denom *= scale_factor_; - mapnik::agg_renderer ren(*m_,m_req,variables,im,scale_factor_); + mapnik::agg_renderer ren(*m_,m_req,variables,im,scale_factor_); ren.start_map_processing(*m_); std::vector const& layers = m_->layers(); process_layers(ren,m_req,map_proj,layers,scale_denom); ren.end_map_processing(*m_); bool diff = false; - mapnik::image_data_rgba8 const& dest = im; - mapnik::image_data_rgba8 const& src = im_; + mapnik::image_rgba8 const& dest = im; + mapnik::image_rgba8 const& src = im_; for (unsigned int y = 0; y < height_; ++y) { const unsigned int* row_from = src.getRow(y); diff --git a/bindings/python/mapnik_image.cpp b/bindings/python/mapnik_image.cpp index 1fac2e371..65456600c 100644 --- a/bindings/python/mapnik_image.cpp +++ b/bindings/python/mapnik_image.cpp @@ -241,7 +241,7 @@ void composite(image_any & dst, image_any & src, mapnik::composite_mode_e mode, std::shared_ptr from_cairo(PycairoSurface* py_surface) { mapnik::cairo_surface_ptr surface(cairo_surface_reference(py_surface->surface), mapnik::cairo_surface_closer()); - mapnik::image_data_rgba8 image = mapnik::image_data_rgba8(cairo_image_surface_get_width(&*surface), cairo_image_surface_get_height(&*surface)); + mapnik::image_rgba8 image = mapnik::image_rgba8(cairo_image_surface_get_width(&*surface), cairo_image_surface_get_height(&*surface)); cairo_image_to_rgba8(image, surface); return std::make_shared(std::move(image)); } diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index cae43a62f..89c9debdb 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -208,9 +208,9 @@ struct agg_renderer_visitor_1 }; template <> -void agg_renderer_visitor_1::operator() (mapnik::image_data_rgba8 & pixmap) +void agg_renderer_visitor_1::operator() (mapnik::image_rgba8 & pixmap) { - mapnik::agg_renderer ren(m_,pixmap,scale_factor_,offset_x_, offset_y_); + mapnik::agg_renderer ren(m_,pixmap,scale_factor_,offset_x_, offset_y_); ren.apply(); } @@ -235,9 +235,9 @@ struct agg_renderer_visitor_2 }; template <> -void agg_renderer_visitor_2::operator() (mapnik::image_data_rgba8 & pixmap) +void agg_renderer_visitor_2::operator() (mapnik::image_rgba8 & pixmap) { - mapnik::agg_renderer ren(m_,pixmap,detector_, scale_factor_,offset_x_, offset_y_); + mapnik::agg_renderer ren(m_,pixmap,detector_, scale_factor_,offset_x_, offset_y_); ren.apply(); } @@ -264,9 +264,9 @@ struct agg_renderer_visitor_3 }; template <> -void agg_renderer_visitor_3::operator() (mapnik::image_data_rgba8 & pixmap) +void agg_renderer_visitor_3::operator() (mapnik::image_rgba8 & pixmap) { - mapnik::agg_renderer ren(m_,req_, vars_, pixmap, scale_factor_, offset_x_, offset_y_); + mapnik::agg_renderer ren(m_,req_, vars_, pixmap, scale_factor_, offset_x_, offset_y_); ren.apply(); } @@ -293,9 +293,9 @@ struct agg_renderer_visitor_4 }; template <> -void agg_renderer_visitor_4::operator() (mapnik::image_data_rgba8 & pixmap) +void agg_renderer_visitor_4::operator() (mapnik::image_rgba8 & pixmap) { - mapnik::agg_renderer ren(m_,pixmap,scale_factor_,offset_x_, offset_y_); + mapnik::agg_renderer ren(m_,pixmap,scale_factor_,offset_x_, offset_y_); ren.apply(layer_, names_); } diff --git a/demo/c++/rundemo.cpp b/demo/c++/rundemo.cpp index f30bee2b9..39614bfe9 100644 --- a/demo/c++/rundemo.cpp +++ b/demo/c++/rundemo.cpp @@ -305,8 +305,8 @@ int main ( int, char** ) m.zoom_to_box(box2d(-8024477.28459,5445190.38849,-7381388.20071,5662941.44855)); - image_data_rgba8 buf(m.width(),m.height()); - agg_renderer ren(m,buf); + image_rgba8 buf(m.width(),m.height()); + agg_renderer ren(m,buf); ren.apply(); std::string msg("These maps have been rendered using AGG in the current directory:\n"); #ifdef HAVE_JPEG @@ -353,7 +353,7 @@ int main ( int, char** ) cairo_surface_write_to_png(&*image_surface, "cairo-demo.png"); // but we can also benefit from quantization by converting // to a mapnik image object and then saving that - mapnik::image_data_rgba8 im_data(cairo_image_surface_get_width(&*image_surface), cairo_image_surface_get_height(&*image_surface)); + mapnik::image_rgba8 im_data(cairo_image_surface_get_width(&*image_surface), cairo_image_surface_get_height(&*image_surface)); cairo_image_to_rgba8(im_data, image_surface); save_to_file(im_data, "cairo-demo256.png","png8"); cairo_surface_finish(&*image_surface); diff --git a/demo/viewer/mapwidget.cpp b/demo/viewer/mapwidget.cpp index 8c389811e..3f48e146a 100644 --- a/demo/viewer/mapwidget.cpp +++ b/demo/viewer/mapwidget.cpp @@ -41,7 +41,7 @@ #include "mapwidget.hpp" #include "info_dialog.hpp" -using mapnik::image_data_rgba8; +using mapnik::image_rgba8; using mapnik::Map; using mapnik::layer; using mapnik::box2d; @@ -478,7 +478,7 @@ void MapWidget::zoomToLevel(int level) void MapWidget::export_to_file(unsigned ,unsigned ,std::string const&,std::string const&) { - //image_data_rgba8 image(width,height); + //image_rgba8 image(width,height); //agg_renderer renderer(map,image); //renderer.apply(); //image.saveToFile(filename,type); @@ -495,8 +495,8 @@ void render_agg(mapnik::Map const& map, double scaling_factor, QPixmap & pix) unsigned width=map.width(); unsigned height=map.height(); - image_data_rgba8 buf(width,height); - mapnik::agg_renderer ren(map,buf,scaling_factor); + image_rgba8 buf(width,height); + mapnik::agg_renderer ren(map,buf,scaling_factor); try { @@ -539,7 +539,7 @@ void render_cairo(mapnik::Map const& map, double scaling_factor, QPixmap & pix) mapnik::cairo_renderer renderer(map, cairo, scaling_factor); renderer.apply(); } - mapnik::image_data_rgba8 data(map.width(), map.height()); + mapnik::image_rgba8 data(map.width(), map.height()); mapnik::cairo_image_to_rgba8(data, image_surface); QImage image((uchar*)data.getBytes(),data.width(),data.height(),QImage::Format_ARGB32); pix = QPixmap::fromImage(image.rgbSwapped()); diff --git a/demo/viewer/styles_model.cpp b/demo/viewer/styles_model.cpp index d8afc2631..e2f414e8a 100644 --- a/demo/viewer/styles_model.cpp +++ b/demo/viewer/styles_model.cpp @@ -201,7 +201,7 @@ struct symbolizer_icon { // FIXME! /* - std::shared_ptr symbol = sym.get_image(); + std::shared_ptr symbol = sym.get_image(); if (symbol) { QImage image(symbol->getBytes(), diff --git a/include/mapnik/agg_pattern_source.hpp b/include/mapnik/agg_pattern_source.hpp index 324dee630..534d3f671 100644 --- a/include/mapnik/agg_pattern_source.hpp +++ b/include/mapnik/agg_pattern_source.hpp @@ -36,7 +36,7 @@ namespace mapnik class pattern_source : private util::noncopyable { public: - pattern_source(image_data_rgba8 const& pattern, double opacity = 1.0) + pattern_source(image_rgba8 const& pattern, double opacity = 1.0) : pattern_(pattern), opacity_(opacity) {} @@ -57,7 +57,7 @@ public: static_cast(((c >> 24) & 0xff) * opacity_)); } private: - image_data_rgba8 const& pattern_; + image_rgba8 const& pattern_; double opacity_; }; } diff --git a/include/mapnik/agg_render_marker.hpp b/include/mapnik/agg_render_marker.hpp index dcd7dac9c..5f77303ed 100644 --- a/include/mapnik/agg_render_marker.hpp +++ b/include/mapnik/agg_render_marker.hpp @@ -66,7 +66,7 @@ void render_vector_marker(SvgRenderer & svg_renderer, RasterizerType & ras, Rend } template -void render_raster_marker(RendererType renb, RasterizerType & ras, image_data_rgba8 const& src, +void render_raster_marker(RendererType renb, RasterizerType & ras, image_rgba8 const& src, agg::trans_affine const& tr, double opacity, float scale_factor, bool snap_to_pixels) { diff --git a/include/mapnik/agg_renderer.hpp b/include/mapnik/agg_renderer.hpp index 74778b1d9..392aa95b7 100644 --- a/include/mapnik/agg_renderer.hpp +++ b/include/mapnik/agg_renderer.hpp @@ -171,7 +171,7 @@ private: void setup(Map const& m); }; -extern template class MAPNIK_DECL agg_renderer; +extern template class MAPNIK_DECL agg_renderer; } // namespace mapnik diff --git a/include/mapnik/cairo/cairo_context.hpp b/include/mapnik/cairo/cairo_context.hpp index 80f094e4b..44d16db17 100644 --- a/include/mapnik/cairo/cairo_context.hpp +++ b/include/mapnik/cairo/cairo_context.hpp @@ -122,7 +122,7 @@ private: class cairo_pattern : private util::noncopyable { public: - explicit cairo_pattern(image_data_rgba8 const& data, double opacity = 1.0) + explicit cairo_pattern(image_rgba8 const& data, double opacity = 1.0) { int pixels = data.width() * data.height(); const unsigned int *in_ptr = data.getData(); @@ -310,8 +310,8 @@ public: void set_gradient(cairo_gradient const& pattern, box2d const& bbox); void add_image(double x, double y, image_any & data, double opacity); void add_image(agg::trans_affine const& tr, image_any & data, double opacity); - void add_image(double x, double y, image_data_rgba8 & data, double opacity = 1.0); - void add_image(agg::trans_affine const& tr, image_data_rgba8 & data, double opacity = 1.0); + void add_image(double x, double y, image_rgba8 & data, double opacity = 1.0); + void add_image(agg::trans_affine const& tr, image_rgba8 & data, double opacity = 1.0); void set_font_face(cairo_face_manager & manager, face_ptr face); void set_font_matrix(cairo_matrix_t const& matrix); void set_matrix(cairo_matrix_t const& matrix); diff --git a/include/mapnik/cairo/cairo_image_util.hpp b/include/mapnik/cairo/cairo_image_util.hpp index 5fe764bcf..2a520bfc2 100644 --- a/include/mapnik/cairo/cairo_image_util.hpp +++ b/include/mapnik/cairo/cairo_image_util.hpp @@ -33,7 +33,7 @@ namespace mapnik { -static inline void cairo_image_to_rgba8(mapnik::image_data_rgba8 & data, +static inline void cairo_image_to_rgba8(mapnik::image_rgba8 & data, cairo_surface_ptr const& surface) { if (cairo_image_surface_get_format(&*surface) != CAIRO_FORMAT_ARGB32) diff --git a/include/mapnik/grid/grid.hpp b/include/mapnik/grid/grid.hpp index bd4cd1e5d..e1ce21899 100644 --- a/include/mapnik/grid/grid.hpp +++ b/include/mapnik/grid/grid.hpp @@ -195,7 +195,7 @@ public: return height_; } - inline void set_rectangle(value_type id,image_data_rgba8 const& data,int x0,int y0) + inline void set_rectangle(value_type id,image_rgba8 const& data,int x0,int y0) { box2d ext0(0,0,width_,height_); box2d ext1(x0,y0,x0+data.width(),y0+data.height()); diff --git a/include/mapnik/grid/grid_marker_helpers.hpp b/include/mapnik/grid/grid_marker_helpers.hpp index 4a27f841a..f71cdebe6 100644 --- a/include/mapnik/grid/grid_marker_helpers.hpp +++ b/include/mapnik/grid/grid_marker_helpers.hpp @@ -51,7 +51,7 @@ struct raster_markers_rasterizer_dispatch_grid : util::noncopyable using RasterizerType = typename std::tuple_element<1,RendererContext>::type; using PixMapType = typename std::tuple_element<2,RendererContext>::type; - raster_markers_rasterizer_dispatch_grid(image_data_rgba8 const& src, + raster_markers_rasterizer_dispatch_grid(image_rgba8 const& src, agg::trans_affine const& marker_trans, markers_symbolizer const& sym, Detector & detector, @@ -130,7 +130,7 @@ private: pixfmt_type pixf_; RendererBase renb_; RasterizerType & ras_; - image_data_rgba8 const& src_; + image_rgba8 const& src_; agg::trans_affine const& marker_trans_; markers_symbolizer const& sym_; Detector & detector_; diff --git a/include/mapnik/grid/grid_render_marker.hpp b/include/mapnik/grid/grid_render_marker.hpp index 454ae038f..f8b0258b8 100644 --- a/include/mapnik/grid/grid_render_marker.hpp +++ b/include/mapnik/grid/grid_render_marker.hpp @@ -41,7 +41,7 @@ namespace mapnik { template void render_raster_marker(RendererType ren, RasterizerType & ras, - image_data_rgba8 & src, + image_rgba8 & src, mapnik::feature_impl const& feature, agg::trans_affine const& marker_tr, double opacity) diff --git a/include/mapnik/image_any.hpp b/include/mapnik/image_any.hpp index ed4443f8b..58fd0d0b7 100644 --- a/include/mapnik/image_any.hpp +++ b/include/mapnik/image_any.hpp @@ -52,7 +52,7 @@ struct image_data_null }; using image_data_base = util::variant; @@ -217,7 +217,7 @@ inline image_any create_image_any(int width, return image_any(std::move(image_data_null())); case image_dtype_rgba8: default: - return image_any(std::move(image_data_rgba8(width, height, initialize, premultiplied, painted))); + return image_any(std::move(image_rgba8(width, height, initialize, premultiplied, painted))); } } diff --git a/include/mapnik/image_data.hpp b/include/mapnik/image_data.hpp index 30a9da9cd..153e9a3b8 100644 --- a/include/mapnik/image_data.hpp +++ b/include/mapnik/image_data.hpp @@ -277,7 +277,7 @@ private: bool painted_; }; -using image_data_rgba8 = image_data; +using image_rgba8 = image_data; using image_data_gray8 = image_data ; using image_data_gray16 = image_data; using image_data_gray32f = image_data; diff --git a/include/mapnik/image_reader.hpp b/include/mapnik/image_reader.hpp index 2e6a6b9c0..471a08b58 100644 --- a/include/mapnik/image_reader.hpp +++ b/include/mapnik/image_reader.hpp @@ -60,7 +60,7 @@ struct MAPNIK_DECL image_reader : private util::noncopyable virtual unsigned height() const = 0; virtual bool has_alpha() const = 0; virtual boost::optional > bounding_box() const = 0; - virtual void read(unsigned x,unsigned y,image_data_rgba8& image) = 0; + virtual void read(unsigned x,unsigned y,image_rgba8& image) = 0; virtual image_any read(unsigned x, unsigned y, unsigned width, unsigned height) = 0; virtual ~image_reader() {} }; diff --git a/include/mapnik/image_scaling_traits.hpp b/include/mapnik/image_scaling_traits.hpp index fe2ce61ed..47b47e331 100644 --- a/include/mapnik/image_scaling_traits.hpp +++ b/include/mapnik/image_scaling_traits.hpp @@ -38,7 +38,7 @@ template struct agg_scaling_traits {}; template <> -struct agg_scaling_traits +struct agg_scaling_traits { using pixfmt_pre = agg::pixfmt_rgba32_pre; using color_type = agg::rgba8; diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp index d7efa51fe..25c36afd1 100644 --- a/include/mapnik/image_util.hpp +++ b/include/mapnik/image_util.hpp @@ -233,7 +233,7 @@ void add_border(T & image) } /* -extern template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +extern template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&, std::string const&, rgba_palette const&); @@ -243,7 +243,7 @@ extern template MAPNIK_DECL void save_to_file(image_any const&, std::string const&, rgba_palette const&); -extern template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +extern template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&, std::string const&); @@ -251,7 +251,7 @@ extern template MAPNIK_DECL void save_to_file(image_any const&, std::string const&, std::string const&); -extern template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +extern template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&, rgba_palette const&); @@ -259,7 +259,7 @@ extern template MAPNIK_DECL void save_to_file(image_any const&, std::string const&, rgba_palette const&); -extern template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +extern template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&); extern template MAPNIK_DECL void save_to_file(image_any const&, @@ -281,10 +281,10 @@ extern template MAPNIK_DECL void save_to_file(image_view_any con extern template MAPNIK_DECL void save_to_file(image_view_any const&, std::string const&); -extern template MAPNIK_DECL std::string save_to_string(image_data_rgba8 const&, +extern template MAPNIK_DECL std::string save_to_string(image_rgba8 const&, std::string const&); -extern template MAPNIK_DECL std::string save_to_string(image_data_rgba8 const&, +extern template MAPNIK_DECL std::string save_to_string(image_rgba8 const&, std::string const&, rgba_palette const&); @@ -311,15 +311,15 @@ extern template MAPNIK_DECL std::string save_to_string (image_vi */ #ifdef _MSC_VER -template MAPNIK_DECL void save_to_stream( - image_data_rgba8 const& image, +template MAPNIK_DECL void save_to_stream( + image_rgba8 const& image, std::ostream & stream, std::string const& type, rgba_palette const& palette ); -template MAPNIK_DECL void save_to_stream( - image_data_rgba8 const& image, +template MAPNIK_DECL void save_to_stream( + image_rgba8 const& image, std::ostream & stream, std::string const& type ); diff --git a/include/mapnik/image_view.hpp b/include/mapnik/image_view.hpp index d5b645c8b..6c0e9ac94 100644 --- a/include/mapnik/image_view.hpp +++ b/include/mapnik/image_view.hpp @@ -118,7 +118,7 @@ private: T const& data_; }; -using image_view_rgba8 = image_view; +using image_view_rgba8 = image_view; using image_view_gray8 = image_view; using image_view_gray16 = image_view; using image_view_gray32f = image_view; diff --git a/include/mapnik/marker.hpp b/include/mapnik/marker.hpp index 2edd1473a..f74ac2481 100644 --- a/include/mapnik/marker.hpp +++ b/include/mapnik/marker.hpp @@ -57,7 +57,7 @@ public: marker() { // create default OGC 4x4 black pixel - image_data_rgba8 image(4,4,true,true); + image_rgba8 image(4,4,true,true); image.set(0xff000000); bitmap_data_ = boost::optional(std::make_shared(std::move(image))); } diff --git a/include/mapnik/miniz_png.hpp b/include/mapnik/miniz_png.hpp index 5c6fed248..e5e00748c 100644 --- a/include/mapnik/miniz_png.hpp +++ b/include/mapnik/miniz_png.hpp @@ -85,9 +85,9 @@ private: extern template MAPNIK_DECL void PNGWriter::writeIDAT(image_data_gray8 const& image); extern template MAPNIK_DECL void PNGWriter::writeIDAT(image_view_gray8 const& image); -extern template MAPNIK_DECL void PNGWriter::writeIDAT(image_data_rgba8 const& image); +extern template MAPNIK_DECL void PNGWriter::writeIDAT(image_rgba8 const& image); extern template MAPNIK_DECL void PNGWriter::writeIDAT(image_view_rgba8 const& image); -extern template MAPNIK_DECL void PNGWriter::writeIDATStripAlpha(image_data_rgba8 const& image); +extern template MAPNIK_DECL void PNGWriter::writeIDATStripAlpha(image_rgba8 const& image); extern template MAPNIK_DECL void PNGWriter::writeIDATStripAlpha(image_view_rgba8 const& image); }} diff --git a/include/mapnik/png_io.hpp b/include/mapnik/png_io.hpp index 7034ca293..de504a3a6 100644 --- a/include/mapnik/png_io.hpp +++ b/include/mapnik/png_io.hpp @@ -166,7 +166,7 @@ void reduce_8(T const& in, } for (unsigned y = 0; y < height; ++y) { - mapnik::image_data_rgba8::pixel_type const * row = in.getRow(y); + mapnik::image_rgba8::pixel_type const * row = in.getRow(y); mapnik::image_data_gray8::pixel_type * row_out = out.getRow(y); for (unsigned x = 0; x < width; ++x) { @@ -217,7 +217,7 @@ void reduce_4(T const& in, } for (unsigned y = 0; y < height; ++y) { - mapnik::image_data_rgba8::pixel_type const * row = in.getRow(y); + mapnik::image_rgba8::pixel_type const * row = in.getRow(y); mapnik::image_data_gray8::pixel_type * row_out = out.getRow(y); for (unsigned x = 0; x < width; ++x) { @@ -603,7 +603,7 @@ void save_as_png8(T1 & file, image_data_gray8 reduced_image(width, height); for (unsigned y = 0; y < height; ++y) { - mapnik::image_data_rgba8::pixel_type const * row = image.getRow(y); + mapnik::image_rgba8::pixel_type const * row = image.getRow(y); mapnik::image_data_gray8::pixel_type * row_out = reduced_image.getRow(y); for (unsigned x = 0; x < width; ++x) { @@ -629,7 +629,7 @@ void save_as_png8(T1 & file, image_data_gray8 reduced_image(image_width, image_height); for (unsigned y = 0; y < height; ++y) { - mapnik::image_data_rgba8::pixel_type const * row = image.getRow(y); + mapnik::image_rgba8::pixel_type const * row = image.getRow(y); mapnik::image_data_gray8::pixel_type * row_out = reduced_image.getRow(y); byte index = 0; for (unsigned x = 0; x < width; ++x) diff --git a/include/mapnik/raster_colorizer.hpp b/include/mapnik/raster_colorizer.hpp index fe66769b8..f565597c7 100644 --- a/include/mapnik/raster_colorizer.hpp +++ b/include/mapnik/raster_colorizer.hpp @@ -198,7 +198,7 @@ public: colorizer_stops const& get_stops() const { return stops_; } template - void colorize(image_data_rgba8 & out, T const& in, boost::optionalconst& nodata, feature_impl const& f) const; + void colorize(image_rgba8 & out, T const& in, boost::optionalconst& nodata, feature_impl const& f) const; //! \brief Perform the translation of input to output //! diff --git a/include/mapnik/renderer_common/process_group_symbolizer.hpp b/include/mapnik/renderer_common/process_group_symbolizer.hpp index 64a1ad49d..bb9359014 100644 --- a/include/mapnik/renderer_common/process_group_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_group_symbolizer.hpp @@ -150,7 +150,7 @@ struct raster_marker_render_thunk : util::noncopyable snap_to_pixels_(std::move(rhs.snap_to_pixels_)) {} }; -template struct raster_marker_render_thunk; +template struct raster_marker_render_thunk; template struct raster_marker_render_thunk; template struct raster_marker_render_thunk; template struct raster_marker_render_thunk; @@ -184,7 +184,7 @@ struct text_render_thunk : util::noncopyable // via a static visitor later. using render_thunk = util::variant, + raster_marker_render_thunk, raster_marker_render_thunk, raster_marker_render_thunk, raster_marker_render_thunk, diff --git a/include/mapnik/renderer_common/process_raster_symbolizer.hpp b/include/mapnik/renderer_common/process_raster_symbolizer.hpp index 5e171b9b2..881393531 100644 --- a/include/mapnik/renderer_common/process_raster_symbolizer.hpp +++ b/include/mapnik/renderer_common/process_raster_symbolizer.hpp @@ -70,9 +70,9 @@ struct image_data_dispatcher nodata_(nodata) {} void operator() (image_data_null const& data_in) const {} //no-op - void operator() (image_data_rgba8 const& data_in) const + void operator() (image_rgba8 const& data_in) const { - image_data_rgba8 data_out(width_, height_, true, true); + image_rgba8 data_out(width_, height_, true, true); scale_image_agg(data_out, data_in, method_, scale_x_, scale_y_, 0.0, 0.0, filter_factor_); composite_(data_out, comp_op_, opacity_, start_x_, start_y_); } @@ -83,7 +83,7 @@ struct image_data_dispatcher using image_data_type = T; image_data_type data_out(width_, height_); scale_image_agg(data_out, data_in, method_, scale_x_, scale_y_, 0.0, 0.0, filter_factor_); - image_data_rgba8 dst(width_, height_); + image_rgba8 dst(width_, height_); raster_colorizer_ptr colorizer = get(sym_, keys::colorizer); if (colorizer) colorizer->colorize(dst, data_out, nodata_, feature_); premultiply_alpha(dst); @@ -137,9 +137,9 @@ struct image_data_warp_dispatcher void operator() (image_data_null const& data_in) const {} //no-op - void operator() (image_data_rgba8 const& data_in) const + void operator() (image_rgba8 const& data_in) const { - image_data_rgba8 data_out(width_, height_, true, true); + image_rgba8 data_out(width_, height_, true, true); warp_image(data_out, data_in, prj_trans_, target_ext_, source_ext_, offset_x_, offset_y_, mesh_size_, scaling_method_, filter_factor_); composite_(data_out, comp_op_, opacity_, start_x_, start_y_); } @@ -151,7 +151,7 @@ struct image_data_warp_dispatcher image_data_type data_out(width_, height_); if (nodata_) data_out.set(*nodata_); warp_image(data_out, data_in, prj_trans_, target_ext_, source_ext_, offset_x_, offset_y_, mesh_size_, scaling_method_, filter_factor_); - image_data_rgba8 dst(width_, height_); + image_rgba8 dst(width_, height_); raster_colorizer_ptr colorizer = get(sym_, keys::colorizer); if (colorizer) colorizer->colorize(dst, data_out, nodata_, feature_); premultiply_alpha(dst); @@ -205,7 +205,7 @@ void render_raster_symbolizer(raster_symbolizer const& sym, composite_mode_e comp_op = get(sym, keys::comp_op, feature, common.vars_, src_over); double opacity = get(sym,keys::opacity,feature, common.vars_, 1.0); // only premultiply rgba8 images - if (source->data_.is()) + if (source->data_.is()) { auto is_premultiplied = get_optional(sym, keys::premultiplied, feature, common.vars_); if (is_premultiplied && *is_premultiplied) @@ -236,9 +236,9 @@ void render_raster_symbolizer(raster_symbolizer const& sym, (std::abs(start_x) <= eps) && (std::abs(start_y) <= eps) ) { - if (source->data_.is()) + if (source->data_.is()) { - composite(util::get(source->data_), comp_op, opacity, start_x, start_y); + composite(util::get(source->data_), comp_op, opacity, start_x, start_y); } } else diff --git a/include/mapnik/tiff_io.hpp b/include/mapnik/tiff_io.hpp index 38bdb8818..17ce9da0b 100644 --- a/include/mapnik/tiff_io.hpp +++ b/include/mapnik/tiff_io.hpp @@ -192,7 +192,7 @@ struct tag_setter throw ImageWriterException("Could not write TIFF - unknown image type provided"); } - inline void operator() (image_data_rgba8 const& data) const + inline void operator() (image_rgba8 const& data) const { TIFFSetField(output_, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); TIFFSetField(output_, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT); diff --git a/include/mapnik/webp_io.hpp b/include/mapnik/webp_io.hpp index eecd65e70..2ec6c52c8 100644 --- a/include/mapnik/webp_io.hpp +++ b/include/mapnik/webp_io.hpp @@ -98,11 +98,11 @@ inline int import_image_data(T2 const& image, else { // need to copy: https://github.com/mapnik/mapnik/issues/2024 - image_data_rgba8 im(image.width(),image.height()); + image_rgba8 im(image.width(),image.height()); for (unsigned y = 0; y < image.height(); ++y) { typename T2::pixel_type const * row_from = image.getRow(y); - image_data_rgba8::pixel_type * row_to = im.getRow(y); + image_rgba8::pixel_type * row_to = im.getRow(y); std::copy(row_from, row_from + stride, row_to); } if (alpha) @@ -121,11 +121,11 @@ inline int import_image_data(T2 const& image, } template <> -inline int import_image_data(image_data_rgba8 const& im, +inline int import_image_data(image_rgba8 const& im, WebPPicture & pic, bool alpha) { - int stride = sizeof(image_data_rgba8::pixel_type) * im.width(); + int stride = sizeof(image_rgba8::pixel_type) * im.width(); if (alpha) { return WebPPictureImportRGBA(&pic, im.getBytes(), stride); diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 1e276cc2a..4bcc52450 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -229,7 +229,7 @@ feature_ptr gdal_featureset::get_feature(mapnik::query const& q) } else // working with all bands { - mapnik::image_data_rgba8 image(im_width, im_height); + mapnik::image_rgba8 image(im_width, im_height); image.set(std::numeric_limits::max()); for (int i = 0; i < nbands_; ++i) { diff --git a/plugins/input/pgraster/pgraster_wkb_reader.cpp b/plugins/input/pgraster/pgraster_wkb_reader.cpp index 2932a52b0..462a5881b 100644 --- a/plugins/input/pgraster/pgraster_wkb_reader.cpp +++ b/plugins/input/pgraster/pgraster_wkb_reader.cpp @@ -271,7 +271,7 @@ mapnik::raster_ptr read_grayscale_band(mapnik::box2d const& bbox, uint16_t width, uint16_t height, bool hasnodata, T reader) { - mapnik::image_data_rgba8 image(width,height, true, true); + mapnik::image_rgba8 image(width,height, true, true); // Start with plain white (ABGR or RGBA depending on endiannes) // TODO: set to transparent instead? image.set(0xffffffff); @@ -352,7 +352,7 @@ mapnik::raster_ptr pgraster_wkb_reader::read_grayscale(mapnik::box2d con mapnik::raster_ptr pgraster_wkb_reader::read_rgba(mapnik::box2d const& bbox, uint16_t width, uint16_t height) { - mapnik::image_data_rgba8 image(width, height, true, true); + mapnik::image_rgba8 image(width, height, true, true); // Start with plain white (ABGR or RGBA depending on endiannes) image.set(0xffffffff); diff --git a/plugins/input/raster/raster_featureset.cpp b/plugins/input/raster/raster_featureset.cpp index 7c9c8353d..c6a1f630a 100644 --- a/plugins/input/raster/raster_featureset.cpp +++ b/plugins/input/raster/raster_featureset.cpp @@ -43,7 +43,7 @@ using mapnik::query; using mapnik::image_reader; using mapnik::feature_ptr; -using mapnik::image_data_rgba8; +using mapnik::image_rgba8; using mapnik::raster; using mapnik::feature_factory; diff --git a/plugins/input/rasterlite/rasterlite_featureset.cpp b/plugins/input/rasterlite/rasterlite_featureset.cpp index 2e3c6bb40..7171eabdf 100644 --- a/plugins/input/rasterlite/rasterlite_featureset.cpp +++ b/plugins/input/rasterlite/rasterlite_featureset.cpp @@ -114,7 +114,7 @@ feature_ptr rasterlite_featureset::get_feature(mapnik::query const& q) { if (size > 0) { - mapnik::image_data_rgba8 image(width,height); + mapnik::image_rgba8 image(width,height); unsigned char* raster_data = static_cast(raster); unsigned char* image_data = image.getBytes(); std::memcpy(image_data, raster_data, size); diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp index 2837a58b6..1563c3272 100644 --- a/src/agg/agg_renderer.cpp +++ b/src/agg/agg_renderer.cpp @@ -517,8 +517,8 @@ void agg_renderer::draw_geo_extent(box2d const& extent, mapnik::c } } -template class agg_renderer; -template void agg_renderer::debug_draw_box( +template class agg_renderer; +template void agg_renderer::debug_draw_box( agg::rendering_buffer& buf, box2d const& box, double x, double y, double angle); diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index 0f969ca97..5d6fba5c9 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -109,7 +109,7 @@ void agg_renderer::process(building_symbolizer const& sym, }); } -template void agg_renderer::process(building_symbolizer const&, +template void agg_renderer::process(building_symbolizer const&, mapnik::feature_impl &, proj_transform const&); } diff --git a/src/agg/process_debug_symbolizer.cpp b/src/agg/process_debug_symbolizer.cpp index 6ad2bb80c..fafa61133 100644 --- a/src/agg/process_debug_symbolizer.cpp +++ b/src/agg/process_debug_symbolizer.cpp @@ -91,7 +91,7 @@ void agg_renderer::process(debug_symbolizer const& sym, } } -template void agg_renderer::process(debug_symbolizer const&, +template void agg_renderer::process(debug_symbolizer const&, mapnik::feature_impl &, proj_transform const&); } diff --git a/src/agg/process_dot_symbolizer.cpp b/src/agg/process_dot_symbolizer.cpp index 5de5e1501..ad052a79e 100644 --- a/src/agg/process_dot_symbolizer.cpp +++ b/src/agg/process_dot_symbolizer.cpp @@ -98,7 +98,7 @@ void agg_renderer::process(dot_symbolizer const& sym, } } -template void agg_renderer::process(dot_symbolizer const&, +template void agg_renderer::process(dot_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_group_symbolizer.cpp b/src/agg/process_group_symbolizer.cpp index 295982ed2..0c5c8128c 100644 --- a/src/agg/process_group_symbolizer.cpp +++ b/src/agg/process_group_symbolizer.cpp @@ -54,9 +54,9 @@ template struct thunk_renderer; template <> -struct thunk_renderer +struct thunk_renderer { - using renderer_type = agg_renderer; + using renderer_type = agg_renderer; using buffer_type = renderer_type::buffer_type; using text_renderer_type = agg_text_renderer; @@ -94,7 +94,7 @@ struct thunk_renderer render_vector_marker(svg_renderer, *ras_ptr_, renb, thunk.src_->bounding_box(), offset_tr, thunk.opacity_, thunk.snap_to_pixels_); } - void operator()(raster_marker_render_thunk const &thunk) const + void operator()(raster_marker_render_thunk const &thunk) const { using blender_type = agg::comp_op_adaptor_rgba_pre; // comp blender using buf_type = agg::rendering_buffer; @@ -114,17 +114,17 @@ struct thunk_renderer void operator()(raster_marker_render_thunk const &thunk) const { - throw std::runtime_error("Rendering of this image_data_gray8 type is not supported currently by the image_data_rgba8 renderer"); + throw std::runtime_error("Rendering of this image_data_gray8 type is not supported currently by the image_rgba8 renderer"); } void operator()(raster_marker_render_thunk const &thunk) const { - throw std::runtime_error("Rendering of this image_data_gray16 type is not supported currently by the image_data_rgba8 renderer"); + throw std::runtime_error("Rendering of this image_data_gray16 type is not supported currently by the image_rgba8 renderer"); } void operator()(raster_marker_render_thunk const &thunk) const { - throw std::runtime_error("Rendering of this image_data_gray32f type is not supported currently by the image_data_rgba8 renderer"); + throw std::runtime_error("Rendering of this image_data_gray32f type is not supported currently by the image_rgba8 renderer"); } void operator()(text_render_thunk const &thunk) const @@ -179,7 +179,7 @@ void agg_renderer::process(group_symbolizer const& sym, }); } -template void agg_renderer::process(group_symbolizer const&, +template void agg_renderer::process(group_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_line_pattern_symbolizer.cpp b/src/agg/process_line_pattern_symbolizer.cpp index 21fc7231f..5e5821ab0 100644 --- a/src/agg/process_line_pattern_symbolizer.cpp +++ b/src/agg/process_line_pattern_symbolizer.cpp @@ -78,12 +78,12 @@ void agg_renderer::process(line_pattern_symbolizer const& sym, if ((*marker_ptr)->is_bitmap()) { // FIXME: copy is necessary atm to transform a - // shared_ptr into shared_ptr + // shared_ptr into shared_ptr boost::optional bitmap = (*marker_ptr)->get_bitmap_data(); if (bitmap) { mapnik::image_any const& im = *(bitmap)->get(); if (im.is()) { - // invoke copy ctor of image_data_rgba8 + // invoke copy ctor of image_rgba8 pat = std::make_shared(util::get(im)); } } @@ -153,7 +153,7 @@ void agg_renderer::process(line_pattern_symbolizer const& sym, } } -template void agg_renderer::process(line_pattern_symbolizer const&, +template void agg_renderer::process(line_pattern_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_line_symbolizer.cpp b/src/agg/process_line_symbolizer.cpp index 6ef5bf0f8..126c7475c 100644 --- a/src/agg/process_line_symbolizer.cpp +++ b/src/agg/process_line_symbolizer.cpp @@ -223,7 +223,7 @@ void agg_renderer::process(line_symbolizer const& sym, } -template void agg_renderer::process(line_symbolizer const&, +template void agg_renderer::process(line_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index 51d2ccfd5..b05787691 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -149,7 +149,7 @@ struct raster_markers_rasterizer_dispatch : public raster_markers_dispatchsrc_ provided that converts // the destination pixel type required. - render_raster_marker(renb_, ras_, util::get(this->src_), marker_tr, opacity, this->scale_factor_, snap_to_pixels_); + render_raster_marker(renb_, ras_, util::get(this->src_), marker_tr, opacity, this->scale_factor_, snap_to_pixels_); } private: @@ -204,7 +204,7 @@ void agg_renderer::process(markers_symbolizer const& sym, sym, feature, prj_trans, common_, clip_box, renderer_context); } -template void agg_renderer::process(markers_symbolizer const&, +template void agg_renderer::process(markers_symbolizer const&, mapnik::feature_impl &, proj_transform const&); } diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index 91102763d..cabae6dc5 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -60,7 +60,7 @@ void agg_renderer::process(point_symbolizer const& sym, }); } -template void agg_renderer::process(point_symbolizer const&, +template void agg_renderer::process(point_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_polygon_pattern_symbolizer.cpp b/src/agg/process_polygon_pattern_symbolizer.cpp index b2f22ee2f..38a0eee8c 100644 --- a/src/agg/process_polygon_pattern_symbolizer.cpp +++ b/src/agg/process_polygon_pattern_symbolizer.cpp @@ -68,12 +68,12 @@ void agg_renderer::process(polygon_pattern_symbolizer const& sym, if ((*marker_ptr)->is_bitmap()) { // FIXME: copy is necessary atm to transform a - // shared_ptr into shared_ptr + // shared_ptr into shared_ptr boost::optional bitmap = (*marker_ptr)->get_bitmap_data(); if (bitmap) { mapnik::image_any const& im = *(bitmap)->get(); if (im.is()) { - // invoke copy ctor of image_data_rgba8 + // invoke copy ctor of image_rgba8 pat = std::make_shared(util::get(im)); } } @@ -188,7 +188,7 @@ void agg_renderer::process(polygon_pattern_symbolizer const& sym, } -template void agg_renderer::process(polygon_pattern_symbolizer const&, +template void agg_renderer::process(polygon_pattern_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_polygon_symbolizer.cpp b/src/agg/process_polygon_symbolizer.cpp index d49b82be9..13b9f1e9f 100644 --- a/src/agg/process_polygon_symbolizer.cpp +++ b/src/agg/process_polygon_symbolizer.cpp @@ -87,7 +87,7 @@ void agg_renderer::process(polygon_symbolizer const& sym, }); } -template void agg_renderer::process(polygon_symbolizer const&, +template void agg_renderer::process(polygon_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_raster_symbolizer.cpp b/src/agg/process_raster_symbolizer.cpp index 907ff67f8..f51c3d0d1 100644 --- a/src/agg/process_raster_symbolizer.cpp +++ b/src/agg/process_raster_symbolizer.cpp @@ -51,7 +51,7 @@ void agg_renderer::process(raster_symbolizer const& sym, { render_raster_symbolizer( sym, feature, prj_trans, common_, - [&](image_data_rgba8 & target, composite_mode_e comp_op, double opacity, + [&](image_rgba8 & target, composite_mode_e comp_op, double opacity, int start_x, int start_y) { composite(*current_buffer_, target, comp_op, opacity, start_x, start_y); @@ -59,7 +59,7 @@ void agg_renderer::process(raster_symbolizer const& sym, ); } -template void agg_renderer::process(raster_symbolizer const&, +template void agg_renderer::process(raster_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_shield_symbolizer.cpp b/src/agg/process_shield_symbolizer.cpp index 6c01aaaa9..619fb163c 100644 --- a/src/agg/process_shield_symbolizer.cpp +++ b/src/agg/process_shield_symbolizer.cpp @@ -72,7 +72,7 @@ void agg_renderer::process(shield_symbolizer const& sym, } -template void agg_renderer::process(shield_symbolizer const&, +template void agg_renderer::process(shield_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/agg/process_text_symbolizer.cpp b/src/agg/process_text_symbolizer.cpp index 3dcf12381..c697d0521 100644 --- a/src/agg/process_text_symbolizer.cpp +++ b/src/agg/process_text_symbolizer.cpp @@ -75,7 +75,7 @@ void agg_renderer::process(text_symbolizer const& sym, } } -template void agg_renderer::process(text_symbolizer const&, +template void agg_renderer::process(text_symbolizer const&, mapnik::feature_impl &, proj_transform const&); diff --git a/src/cairo/cairo_context.cpp b/src/cairo/cairo_context.cpp index abf5b658a..ba6774cae 100644 --- a/src/cairo/cairo_context.cpp +++ b/src/cairo/cairo_context.cpp @@ -53,7 +53,7 @@ struct visitor_context_add_image_1 }; template <> -void visitor_context_add_image_1::operator() (image_data_rgba8 & data) +void visitor_context_add_image_1::operator() (image_rgba8 & data) { context_.add_image(x_, y_, data, opacity_); } @@ -76,7 +76,7 @@ struct visitor_context_add_image_2 }; template <> -void visitor_context_add_image_2::operator() (image_data_rgba8 & data) +void visitor_context_add_image_2::operator() (image_rgba8 & data) { context_.add_image(tr_, data, opacity_); } @@ -398,7 +398,7 @@ void cairo_context::add_image(agg::trans_affine const& tr, image_any & data, dou util::apply_visitor(detail::visitor_context_add_image_2(*this,tr,opacity), data); } -void cairo_context::add_image(double x, double y, image_data_rgba8 & data, double opacity) +void cairo_context::add_image(double x, double y, image_rgba8 & data, double opacity) { cairo_pattern pattern(data); pattern.set_origin(x, y); @@ -409,7 +409,7 @@ void cairo_context::add_image(double x, double y, image_data_rgba8 & data, doubl check_object_status_and_throw_exception(*this); } -void cairo_context::add_image(agg::trans_affine const& tr, image_data_rgba8 & data, double opacity) +void cairo_context::add_image(agg::trans_affine const& tr, image_rgba8 & data, double opacity) { cairo_pattern pattern(data); if (!tr.is_identity()) diff --git a/src/cairo/process_group_symbolizer.cpp b/src/cairo/process_group_symbolizer.cpp index 599baf5ec..f5150aa97 100644 --- a/src/cairo/process_group_symbolizer.cpp +++ b/src/cairo/process_group_symbolizer.cpp @@ -77,7 +77,7 @@ struct thunk_renderer thunk.opacity_); } - void operator()(raster_marker_render_thunk const &thunk) const + void operator()(raster_marker_render_thunk const &thunk) const { cairo_save_restore guard(context_); context_.set_operator(thunk.comp_op_); diff --git a/src/cairo/process_line_pattern_symbolizer.cpp b/src/cairo/process_line_pattern_symbolizer.cpp index 9cc10f17b..096672169 100644 --- a/src/cairo/process_line_pattern_symbolizer.cpp +++ b/src/cairo/process_line_pattern_symbolizer.cpp @@ -55,7 +55,7 @@ struct visitor_create_pattern }; template <> -std::shared_ptr visitor_create_pattern::operator() (image_data_rgba8 & data) +std::shared_ptr visitor_create_pattern::operator() (image_rgba8 & data) { return std::make_shared(data, opacity_); } @@ -87,7 +87,7 @@ void cairo_renderer::process(line_pattern_symbolizer const& sym, cairo_save_restore guard(context_); context_.set_operator(comp_op); std::shared_ptr pattern; - std::shared_ptr image = nullptr; + std::shared_ptr image = nullptr; // TODO - re-implement at renderer level like polygon_pattern symbolizer double opacity = get(sym, feature, common_.vars_); if ((*marker)->is_bitmap()) @@ -101,7 +101,7 @@ void cairo_renderer::process(line_pattern_symbolizer const& sym, agg::trans_affine image_tr = agg::trans_affine_scaling(common_.scale_factor_); auto image_transform = get_optional(sym, keys::image_transform); if (image_transform) evaluate_transform(image_tr, feature, common_.vars_, *image_transform); - image = render_pattern(ras, **marker, image_tr, 1.0); + image = render_pattern(ras, **marker, image_tr, 1.0); pattern = std::make_unique(*image, opacity); width = image->width(); height = image->height(); diff --git a/src/cairo/process_polygon_pattern_symbolizer.cpp b/src/cairo/process_polygon_pattern_symbolizer.cpp index 99e0e507c..a2c742a7b 100644 --- a/src/cairo/process_polygon_pattern_symbolizer.cpp +++ b/src/cairo/process_polygon_pattern_symbolizer.cpp @@ -58,7 +58,7 @@ struct visitor_set_pattern }; template <> -void visitor_set_pattern::operator() (image_data_rgba8 & data) +void visitor_set_pattern::operator() (image_rgba8 & data) { cairo_pattern pattern(data, opacity_); pattern.set_extend(CAIRO_EXTEND_REPEAT); @@ -119,7 +119,7 @@ void cairo_renderer::process(polygon_pattern_symbolizer const& sym, else { mapnik::rasterizer ras; - std::shared_ptr image = render_pattern(ras, **marker, image_tr, 1.0); // + std::shared_ptr image = render_pattern(ras, **marker, image_tr, 1.0); // cairo_pattern pattern(*image, opacity); pattern.set_extend(CAIRO_EXTEND_REPEAT); pattern.set_origin(offset_x, offset_y); diff --git a/src/cairo/process_raster_symbolizer.cpp b/src/cairo/process_raster_symbolizer.cpp index 36daee737..7915ebbdd 100644 --- a/src/cairo/process_raster_symbolizer.cpp +++ b/src/cairo/process_raster_symbolizer.cpp @@ -43,7 +43,7 @@ void cairo_renderer::process(raster_symbolizer const& sym, cairo_save_restore guard(context_); render_raster_symbolizer( sym, feature, prj_trans, common_, - [&](image_data_rgba8 &target, composite_mode_e comp_op, double opacity, + [&](image_rgba8 &target, composite_mode_e comp_op, double opacity, int start_x, int start_y) { context_.set_operator(comp_op); context_.add_image(start_x, start_y, target, opacity); diff --git a/src/feature_style_processor.cpp b/src/feature_style_processor.cpp index 1b9aef039..3d845e4bc 100644 --- a/src/feature_style_processor.cpp +++ b/src/feature_style_processor.cpp @@ -55,6 +55,6 @@ template class feature_style_processor template class feature_style_processor >; #endif -template class feature_style_processor >; +template class feature_style_processor >; } diff --git a/src/grid/grid_renderer.cpp b/src/grid/grid_renderer.cpp index 55f103232..ccf258632 100644 --- a/src/grid/grid_renderer.cpp +++ b/src/grid/grid_renderer.cpp @@ -165,7 +165,7 @@ void grid_renderer::render_marker(mapnik::feature_impl const& feature, pixel_ } else { - image_data_rgba8 const& data = util::get(**marker.get_bitmap_data()); + image_rgba8 const& data = util::get(**marker.get_bitmap_data()); double width = data.width(); double height = data.height(); double cx = 0.5 * width; @@ -179,7 +179,7 @@ void grid_renderer::render_marker(mapnik::feature_impl const& feature, pixel_ } else { - image_data_rgba8 target(data.width(), data.height()); + image_rgba8 target(data.width(), data.height()); mapnik::scale_image_agg(target, data, SCALING_NEAR, diff --git a/src/grid/process_group_symbolizer.cpp b/src/grid/process_group_symbolizer.cpp index 9398dc404..7ec0a69cd 100644 --- a/src/grid/process_group_symbolizer.cpp +++ b/src/grid/process_group_symbolizer.cpp @@ -103,7 +103,7 @@ struct thunk_renderer pixmap_.add_feature(feature_); } - void operator()(raster_marker_render_thunk const &thunk) const + void operator()(raster_marker_render_thunk const &thunk) const { using buf_type = grid_rendering_buffer; using pixfmt_type = typename grid_renderer_base_type::pixfmt_type; @@ -121,17 +121,17 @@ struct thunk_renderer void operator()(raster_marker_render_thunk const &thunk) const { - throw std::runtime_error("Rendering of this image_data_gray8 type is not supported currently by the image_data_rgba8 renderer"); + throw std::runtime_error("Rendering of this image_data_gray8 type is not supported currently by the image_rgba8 renderer"); } void operator()(raster_marker_render_thunk const &thunk) const { - throw std::runtime_error("Rendering of this image_data_gray16 type is not supported currently by the image_data_rgba8 renderer"); + throw std::runtime_error("Rendering of this image_data_gray16 type is not supported currently by the image_rgba8 renderer"); } void operator()(raster_marker_render_thunk const &thunk) const { - throw std::runtime_error("Rendering of this image_data_gray32f type is not supported currently by the image_data_rgba8 renderer"); + throw std::runtime_error("Rendering of this image_data_gray32f type is not supported currently by the image_rgba8 renderer"); } void operator()(text_render_thunk const &thunk) const diff --git a/src/grid/process_markers_symbolizer.cpp b/src/grid/process_markers_symbolizer.cpp index a57cb943f..be38f83f5 100644 --- a/src/grid/process_markers_symbolizer.cpp +++ b/src/grid/process_markers_symbolizer.cpp @@ -167,7 +167,7 @@ struct raster_markers_rasterizer_dispatch : public raster_markers_dispatchsrc_ provided that converts // the destination pixel type required. - render_raster_marker(RendererType(renb_), ras_, util::get(this->src_), this->feature_, marker_tr, opacity); + render_raster_marker(RendererType(renb_), ras_, util::get(this->src_), this->feature_, marker_tr, opacity); if (!placed_) { pixmap_.add_feature(this->feature_); diff --git a/src/image_compositing.cpp b/src/image_compositing.cpp index 89d2f9d05..ea776a282 100644 --- a/src/image_compositing.cpp +++ b/src/image_compositing.cpp @@ -149,14 +149,14 @@ struct rendering_buffer } // end detail ns template <> -MAPNIK_DECL void composite(image_data_rgba8 & dst, image_data_rgba8 const& src, composite_mode_e mode, +MAPNIK_DECL void composite(image_rgba8 & dst, image_rgba8 const& src, composite_mode_e mode, float opacity, int dx, int dy) { using color = agg::rgba8; using order = agg::order_rgba; - using const_rendering_buffer = detail::rendering_buffer; + using const_rendering_buffer = detail::rendering_buffer; using blender_type = agg::comp_op_adaptor_rgba_pre; using pixfmt_type = agg::pixfmt_custom_blend_rgba; using renderer_type = agg::renderer_base; @@ -233,9 +233,9 @@ void composite_visitor::operator() (T & dst) } template <> -void composite_visitor::operator() (image_data_rgba8 & dst) +void composite_visitor::operator() (image_rgba8 & dst) { - composite(dst, util::get(src_), mode_, opacity_, dx_, dy_); + composite(dst, util::get(src_), mode_, opacity_, dx_, dy_); } template <> diff --git a/src/image_scaling.cpp b/src/image_scaling.cpp index 7edf13e6e..d93ce64e2 100644 --- a/src/image_scaling.cpp +++ b/src/image_scaling.cpp @@ -165,7 +165,7 @@ void scale_image_agg(T & target, T const& source, scaling_method_e scaling_metho } -template MAPNIK_DECL void scale_image_agg(image_data_rgba8 &, image_data_rgba8 const&, scaling_method_e, +template MAPNIK_DECL void scale_image_agg(image_rgba8 &, image_rgba8 const&, scaling_method_e, double, double , double, double , double); template MAPNIK_DECL void scale_image_agg(image_data_gray8 &, image_data_gray8 const&, scaling_method_e, diff --git a/src/image_util.cpp b/src/image_util.cpp index 647a07ba7..de5c21f3c 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -126,7 +126,7 @@ MAPNIK_DECL void save_to_stream(T const& image, // This can be removed once image_any and image_view_any are the only // items using this template template <> -MAPNIK_DECL void save_to_stream(image_data_rgba8 const& image, +MAPNIK_DECL void save_to_stream(image_rgba8 const& image, std::ostream & stream, std::string const& type, rgba_palette const& palette) @@ -222,7 +222,7 @@ MAPNIK_DECL void save_to_stream(T const& image, // This can be removed once image_any and image_view_any are the only // items using this template template <> -MAPNIK_DECL void save_to_stream(image_data_rgba8 const& image, +MAPNIK_DECL void save_to_stream(image_rgba8 const& image, std::ostream & stream, std::string const& type) { @@ -321,27 +321,27 @@ MAPNIK_DECL void save_to_file(T const& image, std::string const& filename, rgba_ else throw ImageWriterException("Could not write file to " + filename ); } -// image_data_rgba8 -template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +// image_rgba8 +template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&, std::string const&); -template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&, std::string const&, rgba_palette const& palette); -template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&); -template MAPNIK_DECL void save_to_file(image_data_rgba8 const&, +template MAPNIK_DECL void save_to_file(image_rgba8 const&, std::string const&, rgba_palette const& palette); -template MAPNIK_DECL std::string save_to_string(image_data_rgba8 const&, +template MAPNIK_DECL std::string save_to_string(image_rgba8 const&, std::string const&); -template MAPNIK_DECL std::string save_to_string(image_data_rgba8 const&, +template MAPNIK_DECL std::string save_to_string(image_rgba8 const&, std::string const&, rgba_palette const& palette); @@ -421,7 +421,7 @@ struct is_solid_visitor } }; -template bool is_solid_visitor::operator() (image_data_rgba8 const& data); +template bool is_solid_visitor::operator() (image_rgba8 const& data); template bool is_solid_visitor::operator() (image_data_gray8 const& data); template bool is_solid_visitor::operator() (image_data_gray16 const& data); template bool is_solid_visitor::operator() (image_data_gray32f const& data); @@ -447,9 +447,9 @@ MAPNIK_DECL bool is_solid(T const& image) template MAPNIK_DECL bool is_solid (image_any const&); template MAPNIK_DECL bool is_solid (image_view_any const&); -// Temporary until image_data_rgba8 is removed from passing +// Temporary until image_rgba8 is removed from passing template <> -MAPNIK_DECL bool is_solid(image_data_rgba8 const& image) +MAPNIK_DECL bool is_solid(image_rgba8 const& image) { detail::is_solid_visitor visitor; return visitor(image); @@ -476,7 +476,7 @@ struct premultiply_visitor }; template <> -bool premultiply_visitor::operator() (image_data_rgba8 & data) +bool premultiply_visitor::operator() (image_rgba8 & data) { if (!data.get_premultiplied()) { @@ -500,7 +500,7 @@ struct demultiply_visitor }; template <> -bool demultiply_visitor::operator() (image_data_rgba8 & data) +bool demultiply_visitor::operator() (image_rgba8 & data) { if (data.get_premultiplied()) { @@ -539,7 +539,7 @@ template MAPNIK_DECL bool premultiply_alpha (image_any &); // Temporary, can be removed once image_view_any and image_any are the only ones passed template <> -MAPNIK_DECL bool premultiply_alpha(image_data_rgba8 & image) +MAPNIK_DECL bool premultiply_alpha(image_rgba8 & image) { detail::premultiply_visitor visit; return visit(image); @@ -555,7 +555,7 @@ template MAPNIK_DECL bool demultiply_alpha (image_any &); // Temporary, can be removed once image_view_any and image_any are the only ones passed template <> -MAPNIK_DECL bool demultiply_alpha(image_data_rgba8 & image) +MAPNIK_DECL bool demultiply_alpha(image_rgba8 & image) { detail::demultiply_visitor visit; return visit(image); @@ -571,7 +571,7 @@ template void set_premultiplied_alpha (image_any &, bool); // Temporary, can be removed once image_view_any and image_any are the only ones passed template <> -MAPNIK_DECL void set_premultiplied_alpha(image_data_rgba8 & image, bool status) +MAPNIK_DECL void set_premultiplied_alpha(image_rgba8 & image, bool status) { detail::set_premultiplied_visitor visit(status); visit(image); @@ -596,9 +596,9 @@ struct visitor_set_alpha }; template <> -void visitor_set_alpha::operator() (image_data_rgba8 & data) +void visitor_set_alpha::operator() (image_rgba8 & data) { - using pixel_type = typename image_data_rgba8::pixel_type; + using pixel_type = typename image_rgba8::pixel_type; for (unsigned int y = 0; y < data.height(); ++y) { pixel_type* row_to = data.getRow(y); @@ -635,7 +635,7 @@ MAPNIK_DECL void set_alpha (image_any & data, float opacity) // TEMPORARY can be removed once image_any is only way it is being passed. template<> -MAPNIK_DECL void set_alpha (image_data_rgba8 & data, float opacity) +MAPNIK_DECL void set_alpha (image_rgba8 & data, float opacity) { // Prior to calling the data must not be premultiplied bool remultiply = mapnik::demultiply_alpha(data); @@ -659,9 +659,9 @@ struct visitor_set_grayscale_to_alpha }; template <> -void visitor_set_grayscale_to_alpha::operator() (image_data_rgba8 & data) +void visitor_set_grayscale_to_alpha::operator() (image_rgba8 & data) { - using pixel_type = typename image_data_rgba8::pixel_type; + using pixel_type = typename image_rgba8::pixel_type; for (unsigned int y = 0; y < data.height(); ++y) { pixel_type* row_from = data.getRow(y); @@ -696,7 +696,7 @@ MAPNIK_DECL void set_grayscale_to_alpha (image_any & data) // TEMPORARY can be removed once image_any is only way it is being passed. template<> -MAPNIK_DECL void set_grayscale_to_alpha (image_data_rgba8 & data) +MAPNIK_DECL void set_grayscale_to_alpha (image_rgba8 & data) { // Prior to calling the data must not be premultiplied bool remultiply = mapnik::demultiply_alpha(data); @@ -727,9 +727,9 @@ struct visitor_set_color_to_alpha }; template <> -void visitor_set_color_to_alpha::operator() (image_data_rgba8 & data) +void visitor_set_color_to_alpha::operator() (image_rgba8 & data) { - using pixel_type = typename image_data_rgba8::pixel_type; + using pixel_type = typename image_rgba8::pixel_type; for (unsigned y = 0; y < data.height(); ++y) { pixel_type* row_from = data.getRow(y); @@ -763,7 +763,7 @@ MAPNIK_DECL void set_color_to_alpha (image_any & data, color const& c // TEMPORARY can be removed once image_any is only way it is being passed. template<> -MAPNIK_DECL void set_color_to_alpha (image_data_rgba8 & data, color const& c) +MAPNIK_DECL void set_color_to_alpha (image_rgba8 & data, color const& c) { // Prior to calling the data must not be premultiplied bool remultiply = mapnik::demultiply_alpha(data); @@ -835,7 +835,7 @@ template MAPNIK_DECL void fill(image_any &, double const&); // Temporary remove these later! template <> -MAPNIK_DECL void fill (image_data_rgba8 & data , color const& val) +MAPNIK_DECL void fill (image_rgba8 & data , color const& val) { detail::visitor_fill visitor(val); visitor(data); @@ -843,7 +843,7 @@ MAPNIK_DECL void fill (image_data_rgba8 & data , color // Temporary remove these later! template <> -MAPNIK_DECL void fill (image_data_rgba8 & data , uint32_t const& val) +MAPNIK_DECL void fill (image_rgba8 & data , uint32_t const& val) { detail::visitor_fill visitor(val); visitor(data); @@ -851,7 +851,7 @@ MAPNIK_DECL void fill (image_data_rgba8 & data , uin // Temporary remove these later! template <> -MAPNIK_DECL void fill (image_data_rgba8 & data , int32_t const& val) +MAPNIK_DECL void fill (image_rgba8 & data , int32_t const& val) { detail::visitor_fill visitor(val); visitor(data); @@ -894,10 +894,10 @@ struct visitor_set_rectangle }; template <> -void visitor_set_rectangle::operator() (image_data_rgba8 & dst) +void visitor_set_rectangle::operator() (image_rgba8 & dst) { - using pixel_type = typename image_data_rgba8::pixel_type; - image_data_rgba8 src = util::get(src_); + using pixel_type = typename image_rgba8::pixel_type; + image_rgba8 src = util::get(src_); box2d ext0(0,0,dst.width(),dst.height()); box2d ext1(x0_,y0_,x0_+src.width(),y0_+src.height()); @@ -973,7 +973,7 @@ struct visitor_composite_pixel }; template<> -void visitor_composite_pixel::operator() (image_data_rgba8 & data) +void visitor_composite_pixel::operator() (image_rgba8 & data) { using color_type = agg::rgba8; using value_type = color_type::value_type; @@ -1002,7 +1002,7 @@ MAPNIK_DECL void composite_pixel(T & data, unsigned op, int x, int y, unsigned c // Temporary delete later template <> -MAPNIK_DECL void composite_pixel(image_data_rgba8 & data, unsigned op, int x, int y, unsigned c, unsigned cover, double opacity ) +MAPNIK_DECL void composite_pixel(image_rgba8 & data, unsigned op, int x, int y, unsigned c, unsigned cover, double opacity ) { detail::visitor_composite_pixel visitor(op, x, y, c, cover, opacity); visitor(data); @@ -1078,7 +1078,7 @@ template MAPNIK_DECL void set_pixel(image_any &, std::size_t, std::size_t, doubl // Temporary remove these later! template <> -MAPNIK_DECL void set_pixel (image_data_rgba8 & data, std::size_t x, std::size_t y, color const& val) +MAPNIK_DECL void set_pixel (image_rgba8 & data, std::size_t x, std::size_t y, color const& val) { detail::visitor_set_pixel visitor(x, y, val); visitor(data); @@ -1086,7 +1086,7 @@ MAPNIK_DECL void set_pixel (image_data_rgba8 & data, st // Temporary remove these later! template <> -MAPNIK_DECL void set_pixel (image_data_rgba8 & data, std::size_t x, std::size_t y, uint32_t const& val) +MAPNIK_DECL void set_pixel (image_rgba8 & data, std::size_t x, std::size_t y, uint32_t const& val) { detail::visitor_set_pixel visitor(x, y, val); visitor(data); @@ -1094,7 +1094,7 @@ MAPNIK_DECL void set_pixel (image_data_rgba8 & data, // Temporary remove these later! template <> -MAPNIK_DECL void set_pixel (image_data_rgba8 & data, std::size_t x, std::size_t y, int32_t const& val) +MAPNIK_DECL void set_pixel (image_rgba8 & data, std::size_t x, std::size_t y, int32_t const& val) { detail::visitor_set_pixel visitor(x, y, val); visitor(data); @@ -1176,7 +1176,7 @@ template MAPNIK_DECL double get_pixel(image_any const&, std::size_t, std::size_t // Temporary remove these later! template <> -MAPNIK_DECL color get_pixel (image_data_rgba8 const& data, std::size_t x, std::size_t y) +MAPNIK_DECL color get_pixel (image_rgba8 const& data, std::size_t x, std::size_t y) { detail::visitor_get_pixel visitor(x, y); return visitor(data); @@ -1184,7 +1184,7 @@ MAPNIK_DECL color get_pixel (image_data_rgba8 const& da // Temporary remove these later! template <> -MAPNIK_DECL uint32_t get_pixel (image_data_rgba8 const& data, std::size_t x, std::size_t y) +MAPNIK_DECL uint32_t get_pixel (image_rgba8 const& data, std::size_t x, std::size_t y) { detail::visitor_get_pixel visitor(x, y); return visitor(data); @@ -1192,7 +1192,7 @@ MAPNIK_DECL uint32_t get_pixel (image_data_rgba8 con // Temporary remove these later! template <> -MAPNIK_DECL int32_t get_pixel (image_data_rgba8 const& data, std::size_t x, std::size_t y) +MAPNIK_DECL int32_t get_pixel (image_rgba8 const& data, std::size_t x, std::size_t y) { detail::visitor_get_pixel visitor(x, y); return visitor(data); diff --git a/src/image_util_jpeg.cpp b/src/image_util_jpeg.cpp index efe4611d0..cc0e6c651 100644 --- a/src/image_util_jpeg.cpp +++ b/src/image_util_jpeg.cpp @@ -65,7 +65,7 @@ void process_rgba8_jpeg(T const& image, std::string const& t, std::ostream & str } template<> -void jpeg_saver::operator() (image_data_rgba8 const& image) const +void jpeg_saver::operator() (image_rgba8 const& image) const { process_rgba8_jpeg(image, t_, stream_); } diff --git a/src/image_util_png.cpp b/src/image_util_png.cpp index b34075882..78ced0e0a 100644 --- a/src/image_util_png.cpp +++ b/src/image_util_png.cpp @@ -259,7 +259,7 @@ void process_rgba8_png(T const& image, } template<> -void png_saver_pal::operator() (image_data_rgba8 const& image) const +void png_saver_pal::operator() (image_rgba8 const& image) const { process_rgba8_png_pal(image, t_, stream_, pal_); } @@ -271,7 +271,7 @@ void png_saver_pal::operator() (image_view_rgba8 const& image) } template<> -void png_saver::operator() (image_data_rgba8 const& image) const +void png_saver::operator() (image_rgba8 const& image) const { process_rgba8_png(image, t_, stream_); } diff --git a/src/image_util_tiff.cpp b/src/image_util_tiff.cpp index 533eeb2a3..3da0136bf 100644 --- a/src/image_util_tiff.cpp +++ b/src/image_util_tiff.cpp @@ -181,7 +181,7 @@ void tiff_saver::operator() (T const& image) const #endif } -template void tiff_saver::operator() (image_data_rgba8 const& image) const; +template void tiff_saver::operator() (image_rgba8 const& image) const; template void tiff_saver::operator() (image_data_gray8 const& image) const; template void tiff_saver::operator() (image_data_gray16 const& image) const; template void tiff_saver::operator() (image_data_gray32f const& image) const; diff --git a/src/image_util_webp.cpp b/src/image_util_webp.cpp index 8cea5f718..96b82bf82 100644 --- a/src/image_util_webp.cpp +++ b/src/image_util_webp.cpp @@ -360,7 +360,7 @@ void process_rgba8_webp(T const& image, std::string const& t, std::ostream & str } template <> -void webp_saver::operator() (image_data_rgba8 const& image) const +void webp_saver::operator() (image_rgba8 const& image) const { process_rgba8_webp(image, t_, stream_); } @@ -377,7 +377,7 @@ void webp_saver::operator() (T const& image) const throw ImageWriterException("Mapnik does not support webp grayscale images"); } -template void webp_saver::operator() (image_data_rgba8 const& image) const; +template void webp_saver::operator() (image_rgba8 const& image) const; template void webp_saver::operator() (image_data_gray8 const& image) const; template void webp_saver::operator() (image_data_gray16 const& image) const; template void webp_saver::operator() (image_data_gray32f const& image) const; diff --git a/src/jpeg_reader.cpp b/src/jpeg_reader.cpp index 0bc66e480..e375e9a10 100644 --- a/src/jpeg_reader.cpp +++ b/src/jpeg_reader.cpp @@ -85,7 +85,7 @@ public: unsigned height() const final; boost::optional > bounding_box() const final; inline bool has_alpha() const final { return false; } - void read(unsigned x,unsigned y,image_data_rgba8& image) final; + void read(unsigned x,unsigned y,image_rgba8& image) final; image_any read(unsigned x, unsigned y, unsigned width, unsigned height) final; private: void init(); @@ -265,7 +265,7 @@ boost::optional > jpeg_reader::bounding_box() const } template -void jpeg_reader::read(unsigned x0, unsigned y0, image_data_rgba8& image) +void jpeg_reader::read(unsigned x0, unsigned y0, image_rgba8& image) { stream_.clear(); stream_.seekg(0, std::ios_base::beg); @@ -322,7 +322,7 @@ void jpeg_reader::read(unsigned x0, unsigned y0, image_data_rgba8& image) template image_any jpeg_reader::read(unsigned x, unsigned y, unsigned width, unsigned height) { - image_data_rgba8 data(width,height, true, true); + image_rgba8 data(width,height, true, true); read(x, y, data); return image_any(std::move(data)); } diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index 27e08fcf6..63b27f1d7 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -62,7 +62,7 @@ marker_cache::marker_cache() "" "" ""); - image_data_rgba8 im(4,4,true,true); + image_rgba8 im(4,4,true,true); im.set(0xff000000); boost::optional bitmap_data = boost::optional(std::make_shared(std::move(im))); marker_ptr mark = std::make_shared(bitmap_data); @@ -135,7 +135,7 @@ struct visitor_create_marker }; template<> -marker_ptr visitor_create_marker::operator() (image_data_rgba8 & data) +marker_ptr visitor_create_marker::operator() (image_rgba8 & data) { std::shared_ptr image = std::make_shared(data); mapnik::premultiply_alpha(*image); diff --git a/src/miniz_png.cpp b/src/miniz_png.cpp index 485337992..b4ee851de 100644 --- a/src/miniz_png.cpp +++ b/src/miniz_png.cpp @@ -363,9 +363,9 @@ const mz_uint8 PNGWriter::IEND_tpl[] = { template void PNGWriter::writeIDAT(image_data_gray8 const& image); template void PNGWriter::writeIDAT(image_view_gray8 const& image); -template void PNGWriter::writeIDAT(image_data_rgba8 const& image); +template void PNGWriter::writeIDAT(image_rgba8 const& image); template void PNGWriter::writeIDAT(image_view_rgba8 const& image); -template void PNGWriter::writeIDATStripAlpha(image_data_rgba8 const& image); +template void PNGWriter::writeIDATStripAlpha(image_rgba8 const& image); template void PNGWriter::writeIDATStripAlpha(image_view_rgba8 const& image); }} diff --git a/src/png_reader.cpp b/src/png_reader.cpp index 9efc02bef..0773a4164 100644 --- a/src/png_reader.cpp +++ b/src/png_reader.cpp @@ -80,7 +80,7 @@ public: unsigned height() const final; boost::optional > bounding_box() const final; inline bool has_alpha() const final { return has_alpha_; } - void read(unsigned x,unsigned y,image_data_rgba8& image) final; + void read(unsigned x,unsigned y,image_rgba8& image) final; image_any read(unsigned x, unsigned y, unsigned width, unsigned height) final; private: void init(); @@ -226,7 +226,7 @@ boost::optional > png_reader::bounding_box() const } template -void png_reader::read(unsigned x0, unsigned y0,image_data_rgba8& image) +void png_reader::read(unsigned x0, unsigned y0,image_rgba8& image) { stream_.clear(); stream_.seekg(0, std::ios_base::beg); @@ -312,7 +312,7 @@ void png_reader::read(unsigned x0, unsigned y0,image_data_rgba8& image) template image_any png_reader::read(unsigned x, unsigned y, unsigned width, unsigned height) { - image_data_rgba8 data(width,height); + image_rgba8 data(width,height); read(x, y, data); return image_any(std::move(data)); } diff --git a/src/raster_colorizer.cpp b/src/raster_colorizer.cpp index 9bed5500a..f3bf48ea0 100644 --- a/src/raster_colorizer.cpp +++ b/src/raster_colorizer.cpp @@ -123,7 +123,7 @@ bool raster_colorizer::add_stop(colorizer_stop const& stop) } template -void raster_colorizer::colorize(image_data_rgba8 & out, T const& in, +void raster_colorizer::colorize(image_rgba8 & out, T const& in, boost::optional const& nodata, feature_impl const& f) const { @@ -286,13 +286,13 @@ unsigned raster_colorizer::get_color(float value) const } -template void raster_colorizer::colorize(image_data_rgba8 & out, image_data_gray8 const& in, +template void raster_colorizer::colorize(image_rgba8 & out, image_data_gray8 const& in, boost::optionalconst& nodata, feature_impl const& f) const; -template void raster_colorizer::colorize(image_data_rgba8 & out, image_data_gray16 const& in, +template void raster_colorizer::colorize(image_rgba8 & out, image_data_gray16 const& in, boost::optionalconst& nodata, feature_impl const& f) const; -template void raster_colorizer::colorize(image_data_rgba8 & out, image_data_gray32f const& in, +template void raster_colorizer::colorize(image_rgba8 & out, image_data_gray32f const& in, boost::optionalconst& nodata, feature_impl const& f) const; diff --git a/src/renderer_common/process_group_symbolizer.cpp b/src/renderer_common/process_group_symbolizer.cpp index 2da30b553..c41abba7c 100644 --- a/src/renderer_common/process_group_symbolizer.cpp +++ b/src/renderer_common/process_group_symbolizer.cpp @@ -40,7 +40,7 @@ vector_marker_render_thunk::vector_marker_render_thunk(svg_path_ptr const& src, {} template <> -raster_marker_render_thunk::raster_marker_render_thunk(image_data_rgba8 & src, +raster_marker_render_thunk::raster_marker_render_thunk(image_rgba8 & src, agg::trans_affine const& marker_trans, double opacity, composite_mode_e comp_op, diff --git a/src/renderer_common/render_pattern.cpp b/src/renderer_common/render_pattern.cpp index 0156cf10a..4263882d9 100644 --- a/src/renderer_common/render_pattern.cpp +++ b/src/renderer_common/render_pattern.cpp @@ -38,7 +38,7 @@ namespace mapnik { template <> -std::shared_ptr render_pattern(rasterizer & ras, +std::shared_ptr render_pattern(rasterizer & ras, marker const& marker, agg::trans_affine const& tr, double opacity) @@ -54,7 +54,7 @@ std::shared_ptr render_pattern(rasterizer & mtx.translate(0.5 * bbox.width(), 0.5 * bbox.height()); mtx = tr * mtx; - std::shared_ptr image = std::make_shared(bbox.width(), bbox.height()); + std::shared_ptr image = std::make_shared(bbox.width(), bbox.height()); agg::rendering_buffer buf(image->getBytes(), image->width(), image->height(), image->width() * 4); pixfmt pixf(buf); renderer_base renb(pixf); diff --git a/src/text/renderer.cpp b/src/text/renderer.cpp index a933e45e0..25566e9c4 100644 --- a/src/text/renderer.cpp +++ b/src/text/renderer.cpp @@ -358,7 +358,7 @@ grid_text_renderer::grid_text_renderer(pixmap_type &pixmap, : text_renderer(HALO_RASTERIZER_FAST, comp_op, src_over, scale_factor), pixmap_(pixmap) {} -template class agg_text_renderer; +template class agg_text_renderer; template class grid_text_renderer; } // namespace mapnik diff --git a/src/tiff_reader.cpp b/src/tiff_reader.cpp index 74f1fdd5b..eefc1d98b 100644 --- a/src/tiff_reader.cpp +++ b/src/tiff_reader.cpp @@ -153,7 +153,7 @@ public: unsigned height() const final; boost::optional > bounding_box() const final; inline bool has_alpha() const final { return has_alpha_; } - void read(unsigned x,unsigned y,image_data_rgba8& image) final; + void read(unsigned x,unsigned y,image_rgba8& image) final; image_any read(unsigned x, unsigned y, unsigned width, unsigned height) final; // methods specific to tiff reader unsigned bits_per_sample() const { return bps_; } @@ -168,8 +168,8 @@ private: tiff_reader(const tiff_reader&); tiff_reader& operator=(const tiff_reader&); void init(); - void read_generic(unsigned x,unsigned y,image_data_rgba8& image); - void read_stripped(unsigned x,unsigned y,image_data_rgba8& image); + void read_generic(unsigned x,unsigned y,image_rgba8& image); + void read_stripped(unsigned x,unsigned y,image_rgba8& image); template void read_tiled(unsigned x,unsigned y, ImageData & image); @@ -377,7 +377,7 @@ boost::optional > tiff_reader::bounding_box() const } template -void tiff_reader::read(unsigned x,unsigned y,image_data_rgba8& image) +void tiff_reader::read(unsigned x,unsigned y,image_rgba8& image) { if (read_method_==stripped) { @@ -464,7 +464,7 @@ struct tiff_reader_traits // default specialization that expands into RGBA template <> -struct tiff_reader_traits +struct tiff_reader_traits { using pixel_type = std::uint32_t; static bool read_tile(TIFF * tif, unsigned x0, unsigned y0, pixel_type* buf, std::size_t tile_width, std::size_t tile_height) @@ -518,7 +518,7 @@ image_any tiff_reader::read(unsigned x0, unsigned y0, unsigned width, unsigne TIFF* tif = open(stream_); if (tif) { - image_data_rgba8 data(width, height, true, premultiplied_alpha_); + image_rgba8 data(width, height, true, premultiplied_alpha_); std::size_t element_size = sizeof(detail::rgb8); std::size_t size_to_allocate = (TIFFScanlineSize(tif) + element_size - 1)/element_size; const std::unique_ptr scanline(new detail::rgb8[size_to_allocate]); @@ -532,7 +532,7 @@ image_any tiff_reader::read(unsigned x0, unsigned y0, unsigned width, unsigne { if (y >= y0) { - image_data_rgba8::pixel_type * row = data.getRow(y - y0); + image_rgba8::pixel_type * row = data.getRow(y - y0); std::transform(scanline.get() + start_x, scanline.get() + end_x, row, detail::rgb8_to_rgba8()); } } @@ -543,13 +543,13 @@ image_any tiff_reader::read(unsigned x0, unsigned y0, unsigned width, unsigne } case 16: { - image_data_rgba8 data(width,height,true,premultiplied_alpha_); + image_rgba8 data(width,height,true,premultiplied_alpha_); read(x0, y0, data); return image_any(std::move(data)); } case 32: { - image_data_rgba8 data(width,height,true,premultiplied_alpha_); + image_rgba8 data(width,height,true,premultiplied_alpha_); read(x0, y0, data); return image_any(std::move(data)); } @@ -567,7 +567,7 @@ image_any tiff_reader::read(unsigned x0, unsigned y0, unsigned width, unsigne //PHOTOMETRIC_ITULAB = 10; //PHOTOMETRIC_LOGL = 32844; //PHOTOMETRIC_LOGLUV = 32845; - image_data_rgba8 data(width,height, true, premultiplied_alpha_); + image_rgba8 data(width,height, true, premultiplied_alpha_); read(x0, y0, data); return image_any(std::move(data)); } @@ -576,7 +576,7 @@ image_any tiff_reader::read(unsigned x0, unsigned y0, unsigned width, unsigne } template -void tiff_reader::read_generic(unsigned, unsigned, image_data_rgba8& image) +void tiff_reader::read_generic(unsigned, unsigned, image_rgba8& image) { TIFF* tif = open(stream_); if (tif) @@ -630,12 +630,12 @@ void tiff_reader::read_tiled(unsigned x0,unsigned y0, ImageData & image) template -void tiff_reader::read_stripped(unsigned x0,unsigned y0,image_data_rgba8& image) +void tiff_reader::read_stripped(unsigned x0,unsigned y0,image_rgba8& image) { TIFF* tif = open(stream_); if (tif) { - image_data_rgba8 strip(width_,rows_per_strip_,false); + image_rgba8 strip(width_,rows_per_strip_,false); int width=image.width(); int height=image.height(); diff --git a/src/warp.cpp b/src/warp.cpp index 16a81492d..431263c17 100644 --- a/src/warp.cpp +++ b/src/warp.cpp @@ -210,7 +210,7 @@ void reproject_and_scale_raster(raster & target, raster const& source, util::apply_visitor(warper, source.data_); } -template MAPNIK_DECL void warp_image (image_data_rgba8&, image_data_rgba8 const&, proj_transform const&, +template MAPNIK_DECL void warp_image (image_rgba8&, image_rgba8 const&, proj_transform const&, box2d const&, box2d const&, double, double, unsigned, scaling_method_e, double); template MAPNIK_DECL void warp_image (image_data_gray8&, image_data_gray8 const&, proj_transform const&, diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp index 2df7f96ba..967fb0469 100644 --- a/src/webp_reader.cpp +++ b/src/webp_reader.cpp @@ -124,7 +124,7 @@ public: unsigned height() const final; boost::optional > bounding_box() const final; inline bool has_alpha() const final { return has_alpha_; } - void read(unsigned x,unsigned y,image_data_rgba8& image) final; + void read(unsigned x,unsigned y,image_rgba8& image) final; image_any read(unsigned x, unsigned y, unsigned width, unsigned height) final; private: void init(); @@ -236,7 +236,7 @@ boost::optional > webp_reader::bounding_box() const } template -void webp_reader::read(unsigned x0, unsigned y0,image_data_rgba8& image) +void webp_reader::read(unsigned x0, unsigned y0,image_rgba8& image) { WebPDecoderConfig config; config_guard guard(config); @@ -270,7 +270,7 @@ void webp_reader::read(unsigned x0, unsigned y0,image_data_rgba8& image) template image_any webp_reader::read(unsigned x, unsigned y, unsigned width, unsigned height) { - image_data_rgba8 data(width,height); + image_rgba8 data(width,height); read(x, y, data); return image_any(std::move(data)); } diff --git a/tests/cpp_tests/exceptions_test.cpp b/tests/cpp_tests/exceptions_test.cpp index 38e742344..de3008f1b 100644 --- a/tests/cpp_tests/exceptions_test.cpp +++ b/tests/cpp_tests/exceptions_test.cpp @@ -82,8 +82,8 @@ int main(int argc, char** argv) mapnik::Map m = map; m.add_layer(l); m.zoom_all(); - mapnik::image_data_rgba8 im(m.width(),m.height()); - mapnik::agg_renderer ren(m,im); + mapnik::image_rgba8 im(m.width(),m.height()); + mapnik::agg_renderer ren(m,im); //std::clog << mapnik::save_map_to_string(m) << "\n"; BOOST_TEST(true); // should throw here with "CSV Plugin: no attribute 'foo'. Valid attributes are: x,y." diff --git a/tests/cpp_tests/fontset_runtime_test.cpp b/tests/cpp_tests/fontset_runtime_test.cpp index 9c6c883d9..a0045e646 100644 --- a/tests/cpp_tests/fontset_runtime_test.cpp +++ b/tests/cpp_tests/fontset_runtime_test.cpp @@ -81,8 +81,8 @@ int main(int argc, char** argv) m.insert_style("style", std::move(the_style) ); m.zoom_to_box(mapnik::box2d(-256,-256, 256,256)); - mapnik::image_data_rgba8 buf(m.width(),m.height()); - mapnik::agg_renderer ren(m,buf); + mapnik::image_rgba8 buf(m.width(),m.height()); + mapnik::agg_renderer ren(m,buf); ren.apply(); } catch (std::exception const& ex) { BOOST_TEST_EQ(std::string(ex.what()),std::string("Unable to find specified font face 'DejaVu Sans Book' in font set: 'fontset'")); diff --git a/tests/cpp_tests/image_io_test.cpp b/tests/cpp_tests/image_io_test.cpp index f275b0665..7cc037862 100644 --- a/tests/cpp_tests/image_io_test.cpp +++ b/tests/cpp_tests/image_io_test.cpp @@ -45,7 +45,7 @@ int main(int argc, char** argv) try { - mapnik::image_data_rgba8 im(-10,-10); // should throw rather than overflow + mapnik::image_rgba8 im(-10,-10); // should throw rather than overflow BOOST_TEST( im.width() < 10 ); // should not get here, but if we did this test should fail } catch (std::exception const& ex) @@ -57,7 +57,7 @@ int main(int argc, char** argv) mapnik::cairo_surface_ptr image_surface( cairo_image_surface_create(CAIRO_FORMAT_ARGB32,256,257), mapnik::cairo_surface_closer()); - mapnik::image_data_rgba8 im_data(cairo_image_surface_get_width(&*image_surface), cairo_image_surface_get_height(&*image_surface)); + mapnik::image_rgba8 im_data(cairo_image_surface_get_width(&*image_surface), cairo_image_surface_get_height(&*image_surface)); im_data.set(1); BOOST_TEST( (unsigned)im_data(0,0) == unsigned(1) ); // Should set back to fully transparent diff --git a/tests/cpp_tests/image_painted_test.cpp b/tests/cpp_tests/image_painted_test.cpp index b3cbc8238..b58a87e07 100644 --- a/tests/cpp_tests/image_painted_test.cpp +++ b/tests/cpp_tests/image_painted_test.cpp @@ -59,8 +59,8 @@ int main(int argc, char** argv) m.zoom_all(); - image_data_rgba8 image(m.width(), m.height()); - agg_renderer ren(m, image); + image_rgba8 image(m.width(), m.height()); + agg_renderer ren(m, image); ren.apply(); BOOST_TEST_EQ(image.painted(), true); diff --git a/tests/cpp_tests/map_request_test.cpp b/tests/cpp_tests/map_request_test.cpp index b9f5210bc..194f2a9b7 100644 --- a/tests/cpp_tests/map_request_test.cpp +++ b/tests/cpp_tests/map_request_test.cpp @@ -29,7 +29,7 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) { throw mapnik::image_reader_exception("Failed to load: " + dest_fn); } - std::shared_ptr image_ptr1 = std::make_shared(reader1->width(),reader1->height()); + std::shared_ptr image_ptr1 = std::make_shared(reader1->width(),reader1->height()); reader1->read(0,0,*image_ptr1); std::unique_ptr reader2(mapnik::get_image_reader(src_fn,"png")); @@ -37,11 +37,11 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) { throw mapnik::image_reader_exception("Failed to load: " + src_fn); } - std::shared_ptr image_ptr2 = std::make_shared(reader2->width(),reader2->height()); + std::shared_ptr image_ptr2 = std::make_shared(reader2->width(),reader2->height()); reader2->read(0,0,*image_ptr2); - image_data_rgba8 const& dest = *image_ptr1; - image_data_rgba8 const& src = *image_ptr2; + image_rgba8 const& dest = *image_ptr1; + image_rgba8 const& src = *image_ptr2; unsigned int width = src.width(); unsigned int height = src.height(); @@ -77,11 +77,11 @@ int main(int argc, char** argv) mapnik::Map m(256,256); mapnik::load_map(m,"./tests/data/good_maps/marker-text-line.xml",false); m.zoom_all(); - mapnik::image_data_rgba8 im(m.width(),m.height()); + mapnik::image_rgba8 im(m.width(),m.height()); double scale_factor = 1.2; // render normally with apply() and just map and image - mapnik::agg_renderer renderer1(m,im,scale_factor); + mapnik::agg_renderer renderer1(m,im,scale_factor); renderer1.apply(); std::string actual1("/tmp/map-request-marker-text-line-actual1.png"); //mapnik::save_to_file(im,expected); @@ -99,7 +99,7 @@ int main(int argc, char** argv) // render using apply() and mapnik::request mapnik::attributes vars; - mapnik::agg_renderer renderer2(m,req,vars,im,scale_factor); + mapnik::agg_renderer renderer2(m,req,vars,im,scale_factor); renderer2.apply(); std::string actual2("/tmp/map-request-marker-text-line-actual2.png"); mapnik::save_to_file(im,actual2); @@ -111,7 +111,7 @@ int main(int argc, char** argv) mapnik::fill(im, 0); // render with apply_to_layer api and mapnik::request params passed to apply_to_layer - mapnik::agg_renderer renderer3(m,req,vars,im,scale_factor); + mapnik::agg_renderer renderer3(m,req,vars,im,scale_factor); renderer3.start_map_processing(m); mapnik::projection map_proj(m.srs(),true); double scale_denom = mapnik::scale_denominator(req.scale(),map_proj.is_geographic()); diff --git a/tests/cxx/tiff_io.cpp b/tests/cxx/tiff_io.cpp index d312331c7..1a352aae0 100644 --- a/tests/cxx/tiff_io.cpp +++ b/tests/cxx/tiff_io.cpp @@ -75,7 +75,7 @@ SECTION("scan rgb8 striped") { REQUIRE( reader2->width() == 512 ); REQUIRE( reader2->height() == 512 ); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); - REQUIRE( data.is() == true ); + REQUIRE( data.is() == true ); TIFF_ASSERT_SIZE( data,reader ); TIFF_ASSERT_NO_ALPHA( data ); TIFF_READ_ONE_PIXEL @@ -105,7 +105,7 @@ SECTION("scan rgb8 tiled") { REQUIRE( reader2->width() == 512 ); REQUIRE( reader2->height() == 512 ); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); - REQUIRE( data.is() == true ); + REQUIRE( data.is() == true ); TIFF_ASSERT_SIZE( data,reader ); TIFF_ASSERT_NO_ALPHA( data ); TIFF_READ_ONE_PIXEL @@ -121,7 +121,7 @@ SECTION("rgba8 striped") { REQUIRE( tiff_reader.photometric() == PHOTOMETRIC_RGB ); REQUIRE( tiff_reader.compression() == COMPRESSION_ADOBE_DEFLATE ); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); - REQUIRE( data.is() == true ); + REQUIRE( data.is() == true ); TIFF_ASSERT_SIZE( data,reader ); TIFF_ASSERT_ALPHA( data ); TIFF_READ_ONE_PIXEL @@ -137,7 +137,7 @@ SECTION("rgba8 tiled") { REQUIRE( tiff_reader.photometric() == PHOTOMETRIC_RGB ); REQUIRE( tiff_reader.compression() == COMPRESSION_LZW ); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); - REQUIRE( data.is() == true ); + REQUIRE( data.is() == true ); TIFF_ASSERT_SIZE( data,reader ); TIFF_ASSERT_ALPHA( data ); TIFF_READ_ONE_PIXEL @@ -153,7 +153,7 @@ SECTION("rgb8 striped") { REQUIRE( tiff_reader.photometric() == PHOTOMETRIC_RGB ); REQUIRE( tiff_reader.compression() == COMPRESSION_NONE ); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); - REQUIRE( data.is() == true ); + REQUIRE( data.is() == true ); TIFF_ASSERT_SIZE( data,reader ); TIFF_ASSERT_NO_ALPHA( data ); TIFF_READ_ONE_PIXEL @@ -169,7 +169,7 @@ SECTION("rgb8 tiled") { REQUIRE( tiff_reader.photometric() == PHOTOMETRIC_RGB ); REQUIRE( tiff_reader.compression() == COMPRESSION_LZW ); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); - REQUIRE( data.is() == true ); + REQUIRE( data.is() == true ); TIFF_ASSERT_SIZE( data,reader ); TIFF_ASSERT_NO_ALPHA( data ); TIFF_READ_ONE_PIXEL diff --git a/utils/nik2img/nik2img.cpp b/utils/nik2img/nik2img.cpp index 8a9976248..1d11358df 100644 --- a/utils/nik2img/nik2img.cpp +++ b/utils/nik2img/nik2img.cpp @@ -110,7 +110,7 @@ int main (int argc,char** argv) mapnik::Map map(600,400); mapnik::load_map(map,xml_file,true); map.zoom_all(); - mapnik::image_data_rgba8 im(map.width(),map.height()); + mapnik::image_rgba8 im(map.width(),map.height()); mapnik::request req(map.width(),map.height(),map.get_current_extent()); req.set_buffer_size(map.buffer_size()); mapnik::attributes vars; @@ -137,7 +137,7 @@ int main (int argc,char** argv) } } } - mapnik::agg_renderer ren(map,req,vars,im,scale_factor,0,0); + mapnik::agg_renderer ren(map,req,vars,im,scale_factor,0,0); ren.apply(); mapnik::save_to_file(im,img_file); if (auto_open) diff --git a/utils/svg2png/svg2png.cpp b/utils/svg2png/svg2png.cpp index 4913c1a7e..24f11e623 100644 --- a/utils/svg2png/svg2png.cpp +++ b/utils/svg2png/svg2png.cpp @@ -157,7 +157,7 @@ int main (int argc,char** argv) std::clog << "found width of '" << w << "' and height of '" << h << "'\n"; } // 10 pixel buffer to avoid edge clipping of 100% svg's - mapnik::image_data_rgba8 im(w+0,h+0); + mapnik::image_rgba8 im(w+0,h+0); agg::rendering_buffer buf(im.getBytes(), im.width(), im.height(), im.width() * 4); pixfmt pixf(buf); renderer_base renb(pixf); @@ -181,7 +181,7 @@ int main (int argc,char** argv) boost::algorithm::ireplace_last(svg_name,".svg",".png"); demultiply_alpha(im); - mapnik::save_to_file(im,svg_name,"png"); + mapnik::save_to_file(im,svg_name,"png"); if (auto_open) { std::ostringstream s;