fix method signitures to use std::size_t
rename getSize() -> size(), getRowSize() -> row_size
This commit is contained in:
parent
663a7db8fd
commit
081cf02dcf
27 changed files with 211 additions and 212 deletions
|
@ -45,7 +45,7 @@ void render(mapnik::geometry::multi_polygon<double> const& geom,
|
|||
mapnik::box2d<double> padded_extent(155,134,665,466);//extent;
|
||||
padded_extent.pad(10);
|
||||
mapnik::view_transform tr(im.width(),im.height(),padded_extent,0,0);
|
||||
agg::rendering_buffer buf(im.getBytes(),im.width(),im.height(), im.getRowSize());
|
||||
agg::rendering_buffer buf(im.getBytes(),im.width(),im.height(), im.row_size());
|
||||
agg::pixfmt_rgba32_plain pixf(buf);
|
||||
ren_base renb(pixf);
|
||||
renderer ren(renb);
|
||||
|
|
|
@ -80,7 +80,7 @@ void render_raster_marker(RendererType renb, RasterizerType & ras, image_rgba8 c
|
|||
&& (std::fabs(0.0 - tr.shx) < agg::affine_epsilon)
|
||||
&& (std::fabs(1.0 - tr.sy) < agg::affine_epsilon))
|
||||
{
|
||||
agg::rendering_buffer src_buffer((unsigned char *)src.getBytes(),src.width(),src.height(),src.getRowSize());
|
||||
agg::rendering_buffer src_buffer((unsigned char *)src.getBytes(),src.width(),src.height(),src.row_size());
|
||||
pixfmt_pre pixf_mask(src_buffer);
|
||||
if (snap_to_pixels)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ void render_raster_marker(RendererType renb, RasterizerType & ras, image_rgba8 c
|
|||
agg::rendering_buffer marker_buf((unsigned char *)src.getBytes(),
|
||||
src.width(),
|
||||
src.height(),
|
||||
src.getRowSize());
|
||||
src.row_size());
|
||||
pixfmt_pre pixf(marker_buf);
|
||||
img_accessor_type ia(pixf);
|
||||
agg::trans_affine final_tr(p, 0, 0, width, height);
|
||||
|
|
|
@ -102,8 +102,8 @@ public:
|
|||
const pixel_type& operator() (std::size_t i, std::size_t j) const;
|
||||
std::size_t width() const;
|
||||
std::size_t height() const;
|
||||
unsigned getSize() const;
|
||||
unsigned getRowSize() const;
|
||||
std::size_t size() const;
|
||||
std::size_t row_size() const;
|
||||
void set(pixel_type const& t);
|
||||
const pixel_type* getData() const;
|
||||
pixel_type* getData();
|
||||
|
|
|
@ -64,8 +64,8 @@ struct MAPNIK_DECL image_any : image_base
|
|||
std::size_t height() const;
|
||||
bool get_premultiplied() const;
|
||||
bool painted() const;
|
||||
unsigned getSize() const;
|
||||
unsigned getRowSize() const;
|
||||
std::size_t size() const;
|
||||
std::size_t row_size() const;
|
||||
double get_offset() const;
|
||||
double get_scaling() const;
|
||||
image_dtype get_dtype() const;
|
||||
|
|
|
@ -401,7 +401,7 @@ void apply_filter(Src & src, Filter const& filter)
|
|||
template <typename Src>
|
||||
void apply_filter(Src & src, agg_stack_blur const& op)
|
||||
{
|
||||
agg::rendering_buffer buf(src.getBytes(),src.width(),src.height(), src.getRowSize());
|
||||
agg::rendering_buffer buf(src.getBytes(),src.width(),src.height(), src.row_size());
|
||||
agg::pixfmt_rgba32_pre pixf(buf);
|
||||
agg::stack_blur_rgba32(pixf,op.rx,op.ry);
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ bool image<T>::operator==(image<T> const& rhs) const
|
|||
template <typename T>
|
||||
bool image<T>::operator<(image<T> const& rhs) const
|
||||
{
|
||||
return getSize() < rhs.getSize();
|
||||
return size() < rhs.size();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -181,13 +181,13 @@ inline std::size_t image<T>::height() const
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image<T>::getSize() const
|
||||
inline std::size_t image<T>::size() const
|
||||
{
|
||||
return dimensions_.height() * dimensions_.width() * pixel_size;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image<T>::getRowSize() const
|
||||
inline std::size_t image<T>::row_size() const
|
||||
{
|
||||
return dimensions_.width() * pixel_size;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ inline unsigned char* image<T>::getBytes()
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
inline const typename image<T>::pixel_type* image<T>::getRow(std::size_t row) const
|
||||
inline typename image<T>::pixel_type const* image<T>::getRow(std::size_t row) const
|
||||
{
|
||||
return pData_ + row * dimensions_.width();
|
||||
}
|
||||
|
@ -281,11 +281,11 @@ inline double image<T>::get_scaling() const
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
inline void image<T>::set_scaling(double set)
|
||||
inline void image<T>::set_scaling(double scaling)
|
||||
{
|
||||
if (set != 0.0)
|
||||
if (scaling != 0.0)
|
||||
{
|
||||
scaling_ = set;
|
||||
scaling_ = scaling;
|
||||
return;
|
||||
}
|
||||
std::clog << "Can not set scaling to 0.0, offset not set." << std::endl;
|
||||
|
@ -322,4 +322,3 @@ inline image_dtype image<T>::get_dtype() const
|
|||
}
|
||||
|
||||
} // end ns
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@ public:
|
|||
|
||||
std::size_t width() const { return 0; }
|
||||
std::size_t height() const { return 0; }
|
||||
unsigned getSize() const { return 0; }
|
||||
unsigned getRowSize() const { return 0; }
|
||||
std::size_t size() const { return 0; }
|
||||
std::size_t row_size() const { return 0; }
|
||||
void set(pixel_type const& t) { throw std::runtime_error("Can not set values for null image"); }
|
||||
pixel_type& operator() (std::size_t i, std::size_t j) { throw std::runtime_error("Can not get or set values for null image"); }
|
||||
const pixel_type& operator() (std::size_t i, std::size_t j) const { throw std::runtime_error("Can not get or set values for null image"); }
|
||||
const unsigned char* getBytes() const { return nullptr; }
|
||||
pixel_type const& operator() (std::size_t i, std::size_t j) const { throw std::runtime_error("Can not get or set values for null image"); }
|
||||
unsigned const char* getBytes() const { return nullptr; }
|
||||
unsigned char* getBytes() {return nullptr; }
|
||||
double get_offset() const { return 0.0; }
|
||||
void set_offset(double set) {}
|
||||
|
|
|
@ -33,10 +33,10 @@ class image_view
|
|||
public:
|
||||
using pixel = typename T::pixel;
|
||||
using pixel_type = typename T::pixel_type;
|
||||
static const image_dtype dtype = T::dtype;
|
||||
static constexpr image_dtype dtype = T::dtype;
|
||||
static constexpr std::size_t pixel_size = sizeof(pixel_type);
|
||||
|
||||
image_view(unsigned x, unsigned y, unsigned width, unsigned height, T const& data);
|
||||
image_view(std::size_t x, std::size_t y, std::size_t width, std::size_t height, T const& data);
|
||||
~image_view();
|
||||
|
||||
image_view(image_view<T> const& rhs);
|
||||
|
@ -44,15 +44,15 @@ public:
|
|||
bool operator==(image_view<T> const& rhs) const;
|
||||
bool operator<(image_view<T> const& rhs) const;
|
||||
|
||||
unsigned x() const;
|
||||
unsigned y() const;
|
||||
unsigned width() const;
|
||||
unsigned height() const;
|
||||
const pixel_type& operator() (std::size_t i, std::size_t j) const;
|
||||
unsigned getSize() const;
|
||||
unsigned getRowSize() const;
|
||||
const pixel_type* getRow(unsigned row) const;
|
||||
const pixel_type* getRow(unsigned row, std::size_t x0) const;
|
||||
std::size_t x() const;
|
||||
std::size_t y() const;
|
||||
std::size_t width() const;
|
||||
std::size_t height() const;
|
||||
pixel_type const& operator() (std::size_t i, std::size_t j) const;
|
||||
std::size_t size() const;
|
||||
std::size_t row_size() const;
|
||||
pixel_type const* getRow(std::size_t row) const;
|
||||
pixel_type const* getRow(std::size_t row, std::size_t x0) const;
|
||||
T const& data() const;
|
||||
bool get_premultiplied() const;
|
||||
double get_offset() const;
|
||||
|
|
|
@ -52,8 +52,8 @@ struct MAPNIK_DECL image_view_any : image_view_base
|
|||
|
||||
std::size_t width() const;
|
||||
std::size_t height() const;
|
||||
unsigned getSize() const;
|
||||
unsigned getRowSize() const;
|
||||
std::size_t size() const;
|
||||
std::size_t row_size() const;
|
||||
bool get_premultiplied() const;
|
||||
double get_offset() const;
|
||||
double get_scaling() const;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
namespace mapnik {
|
||||
|
||||
template <typename T>
|
||||
image_view<T>::image_view(unsigned x, unsigned y, unsigned width, unsigned height, T const& data)
|
||||
image_view<T>::image_view(std::size_t x, std::size_t y, std::size_t width, std::size_t height, T const& data)
|
||||
: x_(x),
|
||||
y_(y),
|
||||
width_(width),
|
||||
|
@ -71,59 +71,59 @@ bool image_view<T>::operator==(image_view<T> const& rhs) const
|
|||
template <typename T>
|
||||
bool image_view<T>::operator<(image_view<T> const& rhs) const
|
||||
{
|
||||
return data_.getSize() < rhs.data_.getSize();
|
||||
return data_.size() < rhs.data_.size();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image_view<T>::x() const
|
||||
inline std::size_t image_view<T>::x() const
|
||||
{
|
||||
return x_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image_view<T>::y() const
|
||||
inline std::size_t image_view<T>::y() const
|
||||
{
|
||||
return y_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image_view<T>::width() const
|
||||
inline std::size_t image_view<T>::width() const
|
||||
{
|
||||
return width_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image_view<T>::height() const
|
||||
inline std::size_t image_view<T>::height() const
|
||||
{
|
||||
return height_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const typename image_view<T>::pixel_type& image_view<T>::operator() (std::size_t i, std::size_t j) const
|
||||
inline typename image_view<T>::pixel_type const& image_view<T>::operator() (std::size_t i, std::size_t j) const
|
||||
{
|
||||
return data_(i,j);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image_view<T>::getSize() const
|
||||
inline std::size_t image_view<T>::size() const
|
||||
{
|
||||
return height_ * width_ * pixel_size;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline unsigned image_view<T>::getRowSize() const
|
||||
inline std::size_t image_view<T>::row_size() const
|
||||
{
|
||||
return width_ * pixel_size;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const typename image_view<T>::pixel_type* image_view<T>::getRow(unsigned row) const
|
||||
inline typename image_view<T>::pixel_type const* image_view<T>::getRow(std::size_t row) const
|
||||
{
|
||||
return data_.getRow(row + y_) + x_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const typename image_view<T>::pixel_type* image_view<T>::getRow(unsigned row, std::size_t x0) const
|
||||
inline typename image_view<T>::pixel_type const* image_view<T>::getRow(std::size_t row, std::size_t x0) const
|
||||
{
|
||||
return data_.getRow(row + y_, x0) + x_;
|
||||
}
|
||||
|
|
|
@ -45,15 +45,15 @@ public:
|
|||
bool operator==(image_view<image_null> const& rhs) const { return true; }
|
||||
bool operator<(image_view<image_null> const& rhs) const { return false; }
|
||||
|
||||
unsigned x() const { return 0; }
|
||||
unsigned y() const { return 0; }
|
||||
unsigned width() const { return 0; }
|
||||
unsigned height() const { return 0; }
|
||||
std::size_t x() const { return 0; }
|
||||
std::size_t y() const { return 0; }
|
||||
std::size_t width() const { return 0; }
|
||||
std::size_t height() const { return 0; }
|
||||
pixel_type operator() (std::size_t i, std::size_t j) const { throw std::runtime_error("Can not get from a null image view"); }
|
||||
unsigned getSize() const { return 0; }
|
||||
unsigned getRowSize() const { return 0; }
|
||||
const pixel_type* getRow(unsigned row) const { return nullptr; }
|
||||
const pixel_type* getRow(unsigned row, std::size_t x0) const { return nullptr; }
|
||||
std::size_t size() const { return 0; }
|
||||
std::size_t row_size() const { return 0; }
|
||||
const pixel_type* getRow(std::size_t row) const { return nullptr; }
|
||||
const pixel_type* getRow(std::size_t row, std::size_t x0) const { return nullptr; }
|
||||
bool get_premultiplied() const { return false; }
|
||||
double get_offset() const { return 0.0; }
|
||||
double get_scaling() const { return 1.0; }
|
||||
|
|
|
@ -378,7 +378,7 @@ struct agg_render_marker_visitor
|
|||
agg::rendering_buffer buf(current_buffer_->getBytes(),
|
||||
current_buffer_->width(),
|
||||
current_buffer_->height(),
|
||||
current_buffer_->getRowSize());
|
||||
current_buffer_->row_size());
|
||||
pixfmt_comp_type pixf(buf);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(comp_op_));
|
||||
renderer_base renb(pixf);
|
||||
|
@ -429,7 +429,7 @@ struct agg_render_marker_visitor
|
|||
agg::rendering_buffer buf(current_buffer_->getBytes(),
|
||||
current_buffer_->width(),
|
||||
current_buffer_->height(),
|
||||
current_buffer_->getRowSize());
|
||||
current_buffer_->row_size());
|
||||
pixfmt_comp_type pixf(buf);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(comp_op_));
|
||||
renderer_base renb(pixf);
|
||||
|
@ -486,7 +486,7 @@ struct agg_render_marker_visitor
|
|||
agg::rendering_buffer marker_buf((unsigned char *)src.getBytes(),
|
||||
src.width(),
|
||||
src.height(),
|
||||
src.getRowSize());
|
||||
src.row_size());
|
||||
agg::pixfmt_rgba32_pre marker_pixf(marker_buf);
|
||||
using img_accessor_type = agg::image_accessor_clone<agg::pixfmt_rgba32_pre>;
|
||||
using interpolator_type = agg::span_interpolator_linear<agg::trans_affine>;
|
||||
|
@ -557,7 +557,7 @@ void agg_renderer<T0,T1>::debug_draw_box(box2d<double> const& box,
|
|||
agg::rendering_buffer buf(current_buffer_->getBytes(),
|
||||
current_buffer_->width(),
|
||||
current_buffer_->height(),
|
||||
current_buffer_->getRowSize());
|
||||
current_buffer_->row_size());
|
||||
debug_draw_box(buf, box, x, y, angle);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void agg_renderer<T0,T1>::process(building_symbolizer const& sym,
|
|||
using ren_base = agg::renderer_base<agg::pixfmt_rgba32_pre>;
|
||||
using renderer = agg::renderer_scanline_aa_solid<ren_base>;
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->getRowSize());
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->row_size());
|
||||
agg::pixfmt_rgba32_pre pixf(buf);
|
||||
ren_base renb(pixf);
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ struct RingRenderer {
|
|||
agg::rgba8 const& color)
|
||||
{
|
||||
ras_ptr_.reset();
|
||||
agg::rendering_buffer buf(im_.getBytes(),im_.width(),im_.height(),im_.getRowSize());
|
||||
agg::rendering_buffer buf(im_.getBytes(),im_.width(),im_.height(),im_.row_size());
|
||||
pixfmt_comp_type pixf(buf);
|
||||
renderer_base renb(pixf);
|
||||
renderer_type ren(renb);
|
||||
|
@ -143,7 +143,7 @@ struct RingRenderer {
|
|||
double stroke_width=3)
|
||||
{
|
||||
ras_ptr_.reset();
|
||||
agg::rendering_buffer buf(im_.getBytes(),im_.width(),im_.height(),im_.getRowSize());
|
||||
agg::rendering_buffer buf(im_.getBytes(),im_.width(),im_.height(),im_.row_size());
|
||||
pixfmt_comp_type pixf(buf);
|
||||
renderer_base renb(pixf);
|
||||
renderer_type ren(renb);
|
||||
|
|
|
@ -111,7 +111,7 @@ void agg_renderer<T0,T1>::process(dot_symbolizer const& sym,
|
|||
double opacity = get<double>(sym, keys::opacity, feature, common_.vars_, 1.0);
|
||||
color const& fill = get<mapnik::color>(sym, keys::fill, feature, common_.vars_, mapnik::color(128,128,128));
|
||||
ras_ptr->reset();
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(),current_buffer_->getRowSize());
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(),current_buffer_->row_size());
|
||||
using blender_type = agg::comp_op_adaptor_rgba_pre<agg::rgba8, agg::order_rgba>;
|
||||
using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba<blender_type, agg::rendering_buffer>;
|
||||
using renderer_base = agg::renderer_base<pixfmt_comp_type>;
|
||||
|
|
|
@ -81,7 +81,7 @@ struct thunk_renderer<image_rgba8>
|
|||
renderer_type,
|
||||
pixfmt_comp_type>;
|
||||
ras_ptr_->reset();
|
||||
buf_type render_buffer(buf_->getBytes(), buf_->width(), buf_->height(), buf_->getRowSize());
|
||||
buf_type render_buffer(buf_->getBytes(), buf_->width(), buf_->height(), buf_->row_size());
|
||||
pixfmt_comp_type pixf(render_buffer);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(thunk.comp_op_));
|
||||
renderer_base renb(pixf);
|
||||
|
@ -102,7 +102,7 @@ struct thunk_renderer<image_rgba8>
|
|||
using renderer_base = agg::renderer_base<pixfmt_comp_type>;
|
||||
|
||||
ras_ptr_->reset();
|
||||
buf_type render_buffer(buf_->getBytes(), buf_->width(), buf_->height(), buf_->getRowSize());
|
||||
buf_type render_buffer(buf_->getBytes(), buf_->width(), buf_->height(), buf_->row_size());
|
||||
pixfmt_comp_type pixf(render_buffer);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(thunk.comp_op_));
|
||||
renderer_base renb(pixf);
|
||||
|
|
|
@ -99,7 +99,7 @@ struct agg_renderer_process_visitor_l
|
|||
value_double simplify_tolerance = get<value_double, keys::simplify_tolerance>(sym_, feature_, common_.vars_);
|
||||
value_double smooth = get<value_double, keys::smooth>(sym_, feature_, common_.vars_);
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->getRowSize());
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->row_size());
|
||||
pixfmt_type pixf(buf);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(get<composite_mode_e, keys::comp_op>(sym_, feature_, common_.vars_)));
|
||||
renderer_base ren_base(pixf);
|
||||
|
@ -168,7 +168,7 @@ struct agg_renderer_process_visitor_l
|
|||
value_double smooth = get<value_double, keys::smooth>(sym_, feature_, common_.vars_);
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),
|
||||
current_buffer_->height(), current_buffer_->getRowSize());
|
||||
current_buffer_->height(), current_buffer_->row_size());
|
||||
pixfmt_type pixf(buf);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(get<composite_mode_e, keys::comp_op>(sym_, feature_, common_.vars_)));
|
||||
renderer_base ren_base(pixf);
|
||||
|
|
|
@ -108,7 +108,7 @@ void agg_renderer<T0,T1>::process(line_symbolizer const& sym,
|
|||
gamma_ = gamma;
|
||||
}
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->getRowSize());
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->row_size());
|
||||
|
||||
using color_type = agg::rgba8;
|
||||
using order_type = agg::order_rgba;
|
||||
|
|
|
@ -192,7 +192,7 @@ void agg_renderer<T0,T1>::process(markers_symbolizer const& sym,
|
|||
gamma_ = gamma;
|
||||
}
|
||||
|
||||
buf_type render_buffer(current_buffer_->getBytes(), current_buffer_->width(), current_buffer_->height(), current_buffer_->getRowSize());
|
||||
buf_type render_buffer(current_buffer_->getBytes(), current_buffer_->width(), current_buffer_->height(), current_buffer_->row_size());
|
||||
box2d<double> clip_box = clipping_extent(common_);
|
||||
|
||||
auto renderer_context = std::tie(render_buffer,*ras_ptr,pixmap_);
|
||||
|
|
|
@ -87,7 +87,7 @@ struct agg_renderer_process_visitor_p
|
|||
render_pattern<buffer_type>(*ras_ptr_, marker, image_tr, 1.0, image);
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(), current_buffer_->width(),
|
||||
current_buffer_->height(), current_buffer_->getRowSize());
|
||||
current_buffer_->height(), current_buffer_->row_size());
|
||||
ras_ptr_->reset();
|
||||
value_double gamma = get<value_double, keys::gamma>(sym_, feature_, common_.vars_);
|
||||
gamma_method_enum gamma_method = get<gamma_method_enum, keys::gamma_method>(sym_, feature_, common_.vars_);
|
||||
|
@ -203,7 +203,7 @@ struct agg_renderer_process_visitor_p
|
|||
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(), current_buffer_->width(),
|
||||
current_buffer_->height(), current_buffer_->getRowSize());
|
||||
current_buffer_->height(), current_buffer_->row_size());
|
||||
ras_ptr_->reset();
|
||||
value_double gamma = get<value_double, keys::gamma>(sym_, feature_, common_.vars_);
|
||||
gamma_method_enum gamma_method = get<gamma_method_enum, keys::gamma_method>(sym_, feature_, common_.vars_);
|
||||
|
|
|
@ -61,7 +61,7 @@ void agg_renderer<T0,T1>::process(polygon_symbolizer const& sym,
|
|||
}
|
||||
|
||||
box2d<double> clip_box = clipping_extent(common_);
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->getRowSize());
|
||||
agg::rendering_buffer buf(current_buffer_->getBytes(),current_buffer_->width(),current_buffer_->height(), current_buffer_->row_size());
|
||||
|
||||
render_polygon_symbolizer<vertex_converter_type>(
|
||||
sym, feature, prj_trans, common_, clip_box, *ras_ptr,
|
||||
|
|
|
@ -92,18 +92,18 @@ struct get_painted_visitor
|
|||
struct get_any_size_visitor
|
||||
{
|
||||
template <typename T>
|
||||
unsigned operator()(T const& data) const
|
||||
std::size_t operator()(T const& data) const
|
||||
{
|
||||
return data.getSize();
|
||||
return data.size();
|
||||
}
|
||||
};
|
||||
|
||||
struct get_any_row_size_visitor
|
||||
{
|
||||
template <typename T>
|
||||
unsigned operator()(T const& data) const
|
||||
std::size_t operator()(T const& data) const
|
||||
{
|
||||
return data.getRowSize();
|
||||
return data.row_size();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -191,12 +191,12 @@ MAPNIK_DECL bool image_any::painted() const
|
|||
return util::apply_visitor(detail::get_painted_visitor(),*this);
|
||||
}
|
||||
|
||||
MAPNIK_DECL unsigned image_any::getSize() const
|
||||
MAPNIK_DECL std::size_t image_any::size() const
|
||||
{
|
||||
return util::apply_visitor(detail::get_any_size_visitor(),*this);
|
||||
}
|
||||
|
||||
MAPNIK_DECL unsigned image_any::getRowSize() const
|
||||
MAPNIK_DECL std::size_t image_any::row_size() const
|
||||
{
|
||||
return util::apply_visitor(detail::get_any_row_size_visitor(),*this);
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ struct rendering_buffer
|
|||
uint8_t const* buf() const { return data_.getBytes(); }
|
||||
unsigned width() const { return data_.width();}
|
||||
unsigned height() const { return data_.height();}
|
||||
int stride() const { return data_.getRowSize();}
|
||||
int stride() const { return data_.row_size();}
|
||||
uint8_t const* row_ptr(int, int y, unsigned) {return row_ptr(y);}
|
||||
uint8_t const* row_ptr(int y) const { return reinterpret_cast<uint8_t const*>(data_.getRow(y)); }
|
||||
row_data row (int y) const { return row_data(0, data_.width() - 1, row_ptr(y)); }
|
||||
|
@ -161,7 +161,7 @@ MAPNIK_DECL void composite(image_rgba8 & dst, image_rgba8 const& src, composite_
|
|||
using pixfmt_type = agg::pixfmt_custom_blend_rgba<blender_type, agg::rendering_buffer>;
|
||||
using renderer_type = agg::renderer_base<pixfmt_type>;
|
||||
|
||||
agg::rendering_buffer dst_buffer(dst.getBytes(),dst.width(),dst.height(),dst.getRowSize());
|
||||
agg::rendering_buffer dst_buffer(dst.getBytes(),dst.width(),dst.height(),dst.row_size());
|
||||
const_rendering_buffer src_buffer(src);
|
||||
pixfmt_type pixf(dst_buffer);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(mode));
|
||||
|
|
|
@ -478,7 +478,7 @@ struct premultiply_visitor
|
|||
{
|
||||
if (!data.get_premultiplied())
|
||||
{
|
||||
agg::rendering_buffer buffer(data.getBytes(),data.width(),data.height(),data.getRowSize());
|
||||
agg::rendering_buffer buffer(data.getBytes(),data.width(),data.height(),data.row_size());
|
||||
agg::pixfmt_rgba32 pixf(buffer);
|
||||
pixf.premultiply();
|
||||
data.set_premultiplied(true);
|
||||
|
@ -500,7 +500,7 @@ struct demultiply_visitor
|
|||
{
|
||||
if (data.get_premultiplied())
|
||||
{
|
||||
agg::rendering_buffer buffer(data.getBytes(),data.width(),data.height(),data.getRowSize());
|
||||
agg::rendering_buffer buffer(data.getBytes(),data.width(),data.height(),data.row_size());
|
||||
agg::pixfmt_rgba32_pre pixf(buffer);
|
||||
pixf.demultiply();
|
||||
data.set_premultiplied(false);
|
||||
|
@ -2196,7 +2196,7 @@ struct visitor_view_to_string
|
|||
for (std::size_t i=0;i<view.height();i++)
|
||||
{
|
||||
ss_.write(reinterpret_cast<const char*>(view.getRow(i)),
|
||||
view.getRowSize());
|
||||
view.row_size());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ struct get_view_size_visitor
|
|||
template <typename T>
|
||||
unsigned operator()(T const& data) const
|
||||
{
|
||||
return data.getSize();
|
||||
return data.size();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,7 @@ struct get_view_row_size_visitor
|
|||
template <typename T>
|
||||
unsigned operator()(T const& data) const
|
||||
{
|
||||
return data.getRowSize();
|
||||
return data.row_size();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -110,12 +110,12 @@ std::size_t image_view_any::height() const
|
|||
return util::apply_visitor(detail::get_view_height_visitor(),*this);
|
||||
}
|
||||
|
||||
unsigned image_view_any::getSize() const
|
||||
std::size_t image_view_any::size() const
|
||||
{
|
||||
return util::apply_visitor(detail::get_view_size_visitor(),*this);
|
||||
}
|
||||
|
||||
unsigned image_view_any::getRowSize() const
|
||||
std::size_t image_view_any::row_size() const
|
||||
{
|
||||
return util::apply_visitor(detail::get_view_row_size_visitor(),*this);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ void render_pattern<image_rgba8>(rasterizer & ras,
|
|||
mtx.translate(0.5 * bbox.width(), 0.5 * bbox.height());
|
||||
mtx = tr * mtx;
|
||||
|
||||
agg::rendering_buffer buf(image.getBytes(), image.width(), image.height(), image.getRowSize());
|
||||
agg::rendering_buffer buf(image.getBytes(), image.width(), image.height(), image.row_size());
|
||||
pixfmt pixf(buf);
|
||||
renderer_base renb(pixf);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ struct main_marker_visitor
|
|||
}
|
||||
// 10 pixel buffer to avoid edge clipping of 100% svg's
|
||||
mapnik::image_rgba8 im(w+0,h+0);
|
||||
agg::rendering_buffer buf(im.getBytes(), im.width(), im.height(), im.getRowSize());
|
||||
agg::rendering_buffer buf(im.getBytes(), im.width(), im.height(), im.row_size());
|
||||
pixfmt pixf(buf);
|
||||
renderer_base renb(pixf);
|
||||
|
||||
|
|
Loading…
Reference in a new issue