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);
|
||||
|
@ -388,7 +388,7 @@ public:
|
|||
if (area > 0)
|
||||
{
|
||||
std::reverse(path.begin(), path.end());
|
||||
}
|
||||
}
|
||||
if (!clipper.AddPath(path, ClipperLib::ptSubject, true))
|
||||
{
|
||||
std::clog << "ptSubject ext failed!\n";
|
||||
|
@ -406,7 +406,7 @@ public:
|
|||
if (area < 0)
|
||||
{
|
||||
std::reverse(path.begin(), path.end());
|
||||
}
|
||||
}
|
||||
if (!clipper.AddPath(path, ClipperLib::ptSubject, true))
|
||||
{
|
||||
std::clog << "ptSubject ext failed!\n";
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -85,10 +85,10 @@ private:
|
|||
bool painted_;
|
||||
public:
|
||||
image();
|
||||
image(int width,
|
||||
int height,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
image(int width,
|
||||
int height,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
bool painted = false);
|
||||
image(image<T> const& rhs);
|
||||
image(image<T> && rhs) noexcept;
|
||||
|
@ -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();
|
||||
|
|
|
@ -29,18 +29,18 @@
|
|||
|
||||
namespace mapnik {
|
||||
|
||||
using image_base = util::variant<image_null,
|
||||
image_rgba8,
|
||||
image_gray8,
|
||||
image_gray8s,
|
||||
image_gray16,
|
||||
image_gray16s,
|
||||
image_gray32,
|
||||
image_gray32s,
|
||||
image_gray32f,
|
||||
image_gray64,
|
||||
image_gray64s,
|
||||
image_gray64f>;
|
||||
using image_base = util::variant<image_null,
|
||||
image_rgba8,
|
||||
image_gray8,
|
||||
image_gray8s,
|
||||
image_gray16,
|
||||
image_gray16s,
|
||||
image_gray32,
|
||||
image_gray32s,
|
||||
image_gray32f,
|
||||
image_gray64,
|
||||
image_gray64s,
|
||||
image_gray64f>;
|
||||
|
||||
|
||||
struct MAPNIK_DECL image_any : image_base
|
||||
|
@ -50,13 +50,13 @@ struct MAPNIK_DECL image_any : image_base
|
|||
image_any(int width,
|
||||
int height,
|
||||
image_dtype type = image_dtype_rgba8,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
bool painted = false);
|
||||
|
||||
template <typename T>
|
||||
image_any(T && data) noexcept
|
||||
: image_base(std::move(data)) {}
|
||||
: image_base(std::move(data)) {}
|
||||
|
||||
unsigned char const* getBytes() const;
|
||||
unsigned char* getBytes();
|
||||
|
@ -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;
|
||||
|
@ -73,12 +73,12 @@ struct MAPNIK_DECL image_any : image_base
|
|||
void set_scaling(double val);
|
||||
};
|
||||
|
||||
MAPNIK_DECL image_any create_image_any(int width,
|
||||
int height,
|
||||
image_dtype type = image_dtype_rgba8,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
bool painted = false);
|
||||
MAPNIK_DECL image_any create_image_any(int width,
|
||||
int height,
|
||||
image_dtype type = image_dtype_rgba8,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
bool painted = false);
|
||||
|
||||
} // end mapnik ns
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ image<T>::image()
|
|||
offset_(0.0),
|
||||
scaling_(1.0),
|
||||
premultiplied_alpha_(false),
|
||||
painted_(false)
|
||||
painted_(false)
|
||||
{}
|
||||
|
||||
template <typename T>
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ public:
|
|||
private:
|
||||
public:
|
||||
image() {}
|
||||
image(int width,
|
||||
int height,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
image(int width,
|
||||
int height,
|
||||
bool initialize = true,
|
||||
bool premultiplied = false,
|
||||
bool painted = false) {}
|
||||
image(image<null_t> const& rhs) {}
|
||||
image(image<null_t> && rhs) noexcept {}
|
||||
|
@ -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,26 +33,26 @@ 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);
|
||||
image_view<T> & operator=(image_view<T> const& rhs);
|
||||
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; }
|
||||
|
|
|
@ -121,9 +121,9 @@ struct setup_agg_bg_visitor
|
|||
opacity_(opacity) {}
|
||||
|
||||
void operator() (marker_null const&) {}
|
||||
|
||||
|
||||
void operator() (marker_svg const&) {}
|
||||
|
||||
|
||||
void operator() (marker_rgba8 const& marker)
|
||||
{
|
||||
mapnik::image_rgba8 const& bg_image = marker.get_data();
|
||||
|
@ -338,7 +338,7 @@ struct agg_render_marker_visitor
|
|||
{
|
||||
agg_render_marker_visitor(renderer_common & common,
|
||||
buffer_type * current_buffer,
|
||||
std::unique_ptr<rasterizer> const& ras_ptr,
|
||||
std::unique_ptr<rasterizer> const& ras_ptr,
|
||||
gamma_method_enum & gamma_method,
|
||||
double & gamma,
|
||||
pixel_position const& pos,
|
||||
|
@ -378,11 +378,11 @@ 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);
|
||||
|
||||
|
||||
box2d<double> const& bbox = marker.get_data()->bounding_box();
|
||||
coord<double,2> c = bbox.center();
|
||||
// center the svg marker on '0,0'
|
||||
|
@ -429,11 +429,11 @@ 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);
|
||||
|
||||
|
||||
double width = marker.width();
|
||||
double height = marker.height();
|
||||
if (std::fabs(1.0 - common_.scale_factor_) < 0.001
|
||||
|
@ -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>;
|
||||
|
@ -528,7 +528,7 @@ void agg_renderer<T0,T1>::render_marker(pixel_position const& pos,
|
|||
{
|
||||
agg_render_marker_visitor<buffer_type> visitor(common_,
|
||||
current_buffer_,
|
||||
ras_ptr,
|
||||
ras_ptr,
|
||||
gamma_method_,
|
||||
gamma_,
|
||||
pos,
|
||||
|
@ -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;
|
||||
|
|
|
@ -147,8 +147,8 @@ struct raster_markers_rasterizer_dispatch : public raster_markers_dispatch<Detec
|
|||
|
||||
void render_marker(agg::trans_affine const& marker_tr, double opacity)
|
||||
{
|
||||
// In the long term this should be a visitor pattern based on the type of render this->src_ provided that converts
|
||||
// the destination pixel type required.
|
||||
// In the long term this should be a visitor pattern based on the type of render this->src_ provided that converts
|
||||
// the destination pixel type required.
|
||||
render_raster_marker(renb_, ras_, this->src_, marker_tr, opacity, this->scale_factor_, snap_to_pixels_);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -156,8 +156,8 @@ struct set_scaling_visitor
|
|||
MAPNIK_DECL image_any::image_any(int width,
|
||||
int height,
|
||||
image_dtype type,
|
||||
bool initialize,
|
||||
bool premultiplied,
|
||||
bool initialize,
|
||||
bool premultiplied,
|
||||
bool painted)
|
||||
: image_base(std::move(create_image_any(width, height, type, initialize, premultiplied, painted))) {}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -227,11 +227,11 @@ MAPNIK_DECL void image_any::set_scaling(double val)
|
|||
}
|
||||
|
||||
|
||||
MAPNIK_DECL image_any create_image_any(int width,
|
||||
MAPNIK_DECL image_any create_image_any(int width,
|
||||
int height,
|
||||
image_dtype type,
|
||||
bool initialize,
|
||||
bool premultiplied,
|
||||
image_dtype type,
|
||||
bool initialize,
|
||||
bool premultiplied,
|
||||
bool painted)
|
||||
{
|
||||
switch (type)
|
||||
|
|
|
@ -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,20 +161,20 @@ 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));
|
||||
agg::pixfmt_alpha_blend_rgba<agg::blender_rgba32, const_rendering_buffer, agg::pixel32_type> pixf_mask(src_buffer);
|
||||
#ifdef MAPNIK_DEBUG
|
||||
if (!src.get_premultiplied())
|
||||
if (!src.get_premultiplied())
|
||||
{
|
||||
throw std::runtime_error("SOURCE MUST BE PREMULTIPLIED FOR COMPOSITING!");
|
||||
}
|
||||
if (!dst.get_premultiplied())
|
||||
{
|
||||
throw std::runtime_error("DESTINATION MUST BE PREMULTIPLIED FOR COMPOSITING!");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
renderer_type ren(pixf);
|
||||
ren.blend_from(pixf_mask,0,dx,dy,unsigned(255*opacity));
|
||||
|
@ -203,7 +203,7 @@ namespace detail {
|
|||
|
||||
struct composite_visitor
|
||||
{
|
||||
composite_visitor(image_any const& src,
|
||||
composite_visitor(image_any const& src,
|
||||
composite_mode_e mode,
|
||||
float opacity,
|
||||
int dx,
|
||||
|
@ -213,7 +213,7 @@ struct composite_visitor
|
|||
opacity_(opacity),
|
||||
dx_(dx),
|
||||
dy_(dy) {}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (T & dst);
|
||||
|
||||
|
@ -232,7 +232,7 @@ void composite_visitor::operator() (T & dst)
|
|||
}
|
||||
|
||||
template <>
|
||||
void composite_visitor::operator()<image_rgba8> (image_rgba8 & dst)
|
||||
void composite_visitor::operator()<image_rgba8> (image_rgba8 & dst)
|
||||
{
|
||||
composite(dst, util::get<image_rgba8>(src_), mode_, opacity_, dx_, dy_);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#ifdef SSE_MATH
|
||||
#include <mapnik/sse.hpp>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// agg
|
||||
#include "agg_rendering_buffer.h"
|
||||
|
@ -136,7 +136,7 @@ MAPNIK_DECL void save_to_stream(T const& image,
|
|||
else throw ImageWriterException("Could not write to empty stream" );
|
||||
}
|
||||
|
||||
// This can be removed once image_any and image_view_any are the only
|
||||
// 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_rgba8>(image_rgba8 const& image,
|
||||
|
@ -167,7 +167,7 @@ MAPNIK_DECL void save_to_stream<image_rgba8>(image_rgba8 const& image,
|
|||
else throw ImageWriterException("Could not write to empty stream" );
|
||||
}
|
||||
|
||||
// This can be removed once image_any and image_view_any are the only
|
||||
// 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_view_rgba8>(image_view_rgba8 const& image,
|
||||
|
@ -214,7 +214,7 @@ MAPNIK_DECL void save_to_stream(T const& image,
|
|||
}
|
||||
else if (boost::algorithm::starts_with(t, "tif"))
|
||||
{
|
||||
tiff_saver visitor(stream, t);
|
||||
tiff_saver visitor(stream, t);
|
||||
util::apply_visitor(visitor, image);
|
||||
}
|
||||
else if (boost::algorithm::starts_with(t, "jpeg"))
|
||||
|
@ -232,7 +232,7 @@ MAPNIK_DECL void save_to_stream(T const& image,
|
|||
else throw ImageWriterException("Could not write to empty stream" );
|
||||
}
|
||||
|
||||
// This can be removed once image_any and image_view_any are the only
|
||||
// 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_rgba8>(image_rgba8 const& image,
|
||||
|
@ -251,7 +251,7 @@ MAPNIK_DECL void save_to_stream<image_rgba8>(image_rgba8 const& image,
|
|||
}
|
||||
else if (boost::algorithm::starts_with(t, "tif"))
|
||||
{
|
||||
tiff_saver visitor(stream, t);
|
||||
tiff_saver visitor(stream, t);
|
||||
visitor(image);
|
||||
//util::apply_visitor(visitor, image);
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ MAPNIK_DECL void save_to_stream<image_rgba8>(image_rgba8 const& image,
|
|||
else throw ImageWriterException("Could not write to empty stream" );
|
||||
}
|
||||
|
||||
// This can be removed once image_any and image_view_any are the only
|
||||
// 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_view_rgba8>(image_view_rgba8 const& image,
|
||||
|
@ -291,7 +291,7 @@ MAPNIK_DECL void save_to_stream<image_view_rgba8>(image_view_rgba8 const& image,
|
|||
}
|
||||
else if (boost::algorithm::starts_with(t, "tif"))
|
||||
{
|
||||
tiff_saver visitor(stream, t);
|
||||
tiff_saver visitor(stream, t);
|
||||
visitor(image);
|
||||
//util::apply_visitor(visitor, image);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -488,7 +488,7 @@ struct premultiply_visitor
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
bool operator() (T &)
|
||||
bool operator() (T &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -510,7 +510,7 @@ struct demultiply_visitor
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
bool operator() (T &)
|
||||
bool operator() (T &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -522,7 +522,7 @@ struct set_premultiplied_visitor
|
|||
: status_(status) {}
|
||||
|
||||
template <typename T>
|
||||
void operator() (T & data)
|
||||
void operator() (T & data)
|
||||
{
|
||||
data.set_premultiplied(status_);
|
||||
}
|
||||
|
@ -905,7 +905,7 @@ template MAPNIK_DECL void set_color_to_alpha(image_gray64f &, color const&);
|
|||
namespace detail {
|
||||
|
||||
template <typename T1>
|
||||
struct visitor_fill
|
||||
struct visitor_fill
|
||||
{
|
||||
visitor_fill(T1 const& val)
|
||||
: val_(val) {}
|
||||
|
@ -923,7 +923,7 @@ struct visitor_fill
|
|||
{
|
||||
val = std::numeric_limits<pixel_type>::min();
|
||||
}
|
||||
catch(positive_overflow&)
|
||||
catch(positive_overflow&)
|
||||
{
|
||||
val = std::numeric_limits<pixel_type>::max();
|
||||
}
|
||||
|
@ -939,7 +939,7 @@ struct visitor_fill<color>
|
|||
{
|
||||
visitor_fill(color const& val)
|
||||
: val_(val) {}
|
||||
|
||||
|
||||
void operator() (image_rgba8 & data)
|
||||
{
|
||||
using pixel_type = image_rgba8::pixel_type;
|
||||
|
@ -983,7 +983,7 @@ template MAPNIK_DECL void fill(image_any &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_rgba8 & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ template MAPNIK_DECL void fill(image_rgba8 &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray8 & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1021,7 +1021,7 @@ template MAPNIK_DECL void fill(image_gray8 &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray8s & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ template MAPNIK_DECL void fill(image_gray8s &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray16 & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ template MAPNIK_DECL void fill(image_gray16 &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray16s & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ template MAPNIK_DECL void fill(image_gray16s &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray32 & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ template MAPNIK_DECL void fill(image_gray32 &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray32s & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ template MAPNIK_DECL void fill(image_gray32s &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray32f & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ template MAPNIK_DECL void fill(image_gray32f &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray64 & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ template MAPNIK_DECL void fill(image_gray64 &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray64s & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1173,7 +1173,7 @@ template MAPNIK_DECL void fill(image_gray64s &, double const&);
|
|||
template <typename T>
|
||||
MAPNIK_DECL void fill (image_gray64f & data, T const& val)
|
||||
{
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
detail::visitor_fill<T> visitor(val);
|
||||
return visitor(data);
|
||||
}
|
||||
|
||||
|
@ -1221,7 +1221,7 @@ struct visitor_set_rectangle
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void operator() (image_null &)
|
||||
{
|
||||
throw std::runtime_error("Set rectangle not support for null images");
|
||||
|
@ -1256,7 +1256,7 @@ struct visitor_set_rectangle
|
|||
int y0_;
|
||||
};
|
||||
|
||||
} // end detail ns
|
||||
} // end detail ns
|
||||
|
||||
MAPNIK_DECL void set_rectangle(image_any & dst, image_any const& src, int x, int y)
|
||||
{
|
||||
|
@ -1287,8 +1287,8 @@ namespace detail
|
|||
|
||||
struct visitor_composite_pixel
|
||||
{
|
||||
// Obviously c variable would only work for rgba8 currently, but didn't want to
|
||||
// make this a template class until new rgba types exist.
|
||||
// Obviously c variable would only work for rgba8 currently, but didn't want to
|
||||
// make this a template class until new rgba types exist.
|
||||
visitor_composite_pixel(unsigned op, int x,int y, unsigned c, unsigned cover, double opacity)
|
||||
: opacity_(opacity),
|
||||
op_(op),
|
||||
|
@ -1379,7 +1379,7 @@ struct visitor_set_pixel
|
|||
{
|
||||
val = std::numeric_limits<pixel_type>::min();
|
||||
}
|
||||
catch(positive_overflow&)
|
||||
catch(positive_overflow&)
|
||||
{
|
||||
val = std::numeric_limits<pixel_type>::max();
|
||||
}
|
||||
|
@ -1685,7 +1685,7 @@ struct visitor_get_pixel
|
|||
{
|
||||
val = std::numeric_limits<T1>::min();
|
||||
}
|
||||
catch(positive_overflow&)
|
||||
catch(positive_overflow&)
|
||||
{
|
||||
val = std::numeric_limits<T1>::max();
|
||||
}
|
||||
|
@ -1744,7 +1744,7 @@ template MAPNIK_DECL int16_t get_pixel(image_any const&, std::size_t, std::size_
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_any const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_any const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1762,7 +1762,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_any const&, std::size_t, std::
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_any const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_any const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_rgba8 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1781,7 +1781,7 @@ template MAPNIK_DECL int16_t get_pixel(image_rgba8 const&, std::size_t, std::siz
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_rgba8 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray8 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1800,7 +1800,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray8 const&, std::size_t, std::siz
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray8 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray8s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1819,7 +1819,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray8s const&, std::size_t, std::si
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray8s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray16 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1838,7 +1838,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray16 const&, std::size_t, std::si
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray16 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray16s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1857,7 +1857,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray16s const&, std::size_t, std::s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray16s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray32 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1876,7 +1876,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray32 const&, std::size_t, std::si
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray32 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray32s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1895,7 +1895,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray32s const&, std::size_t, std::s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray32s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray32f const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1914,7 +1914,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray32f const&, std::size_t, std::s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray32f const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray64 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1933,7 +1933,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray64 const&, std::size_t, std::si
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray64 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray64s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1952,7 +1952,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray64s const&, std::size_t, std::s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray64s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_gray64f const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1971,7 +1971,7 @@ template MAPNIK_DECL int16_t get_pixel(image_gray64f const&, std::size_t, std::s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_gray64f const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_rgba8 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -1990,7 +1990,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_rgba8 const&, std::size_t, std
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_rgba8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_rgba8 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray8 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2009,7 +2009,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray8 const&, std::size_t, std
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray8 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray8 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray8s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2028,7 +2028,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray8s const&, std::size_t, st
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray8s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray8s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray16 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2047,7 +2047,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray16 const&, std::size_t, st
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray16 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray16 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray16s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2066,7 +2066,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray16s const&, std::size_t, s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray16s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray16s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray32 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2085,7 +2085,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray32 const&, std::size_t, st
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray32 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray32 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray32s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2104,7 +2104,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray32s const&, std::size_t, s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray32s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray32s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray32f const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2123,7 +2123,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray32f const&, std::size_t, s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray32f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray32f const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray64 const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2142,7 +2142,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray64 const&, std::size_t, st
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray64 const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray64 const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray64s const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2161,7 +2161,7 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray64s const&, std::size_t, s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray64s const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray64s const&, std::size_t, std::size_t);
|
||||
|
||||
template <typename T>
|
||||
MAPNIK_DECL T get_pixel (image_view_gray64f const& data, std::size_t x, std::size_t y)
|
||||
|
@ -2180,9 +2180,9 @@ template MAPNIK_DECL int16_t get_pixel(image_view_gray64f const&, std::size_t, s
|
|||
template MAPNIK_DECL uint8_t get_pixel(image_view_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL int8_t get_pixel(image_view_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL float get_pixel(image_view_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray64f const&, std::size_t, std::size_t);
|
||||
template MAPNIK_DECL double get_pixel(image_view_gray64f const&, std::size_t, std::size_t);
|
||||
|
||||
namespace detail
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct visitor_view_to_string
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2204,7 +2204,7 @@ struct visitor_view_to_string
|
|||
std::ostringstream & ss_;
|
||||
};
|
||||
|
||||
} // end detail ns
|
||||
} // end detail ns
|
||||
|
||||
|
||||
MAPNIK_DECL void view_to_string (image_view_any const& view, std::ostringstream & ss)
|
||||
|
@ -2270,16 +2270,16 @@ MAPNIK_DECL unsigned compare(T const& im1, T const& im2, double threshold, bool)
|
|||
return difference;
|
||||
}
|
||||
|
||||
template MAPNIK_DECL unsigned compare(image_gray8 const&, image_gray8 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray8s const&, image_gray8s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray16 const&, image_gray16 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray16s const&, image_gray16s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray32 const&, image_gray32 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray32s const&, image_gray32s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray32f const&, image_gray32f const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray64 const&, image_gray64 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray64s const&, image_gray64s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray64f const&, image_gray64f const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray8 const&, image_gray8 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray8s const&, image_gray8s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray16 const&, image_gray16 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray16s const&, image_gray16s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray32 const&, image_gray32 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray32s const&, image_gray32s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray32f const&, image_gray32f const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray64 const&, image_gray64 const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray64s const&, image_gray64s const&, double, bool);
|
||||
template MAPNIK_DECL unsigned compare(image_gray64f const&, image_gray64f const&, double, bool);
|
||||
|
||||
template <>
|
||||
MAPNIK_DECL unsigned compare<image_null>(image_null const&, image_null const&, double, bool)
|
||||
|
|
|
@ -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,33 +110,33 @@ 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);
|
||||
}
|
||||
|
||||
bool image_view_any::get_premultiplied() const
|
||||
{
|
||||
{
|
||||
return util::apply_visitor(detail::get_view_premultiplied_visitor(),*this);
|
||||
}
|
||||
|
||||
double image_view_any::get_offset() const
|
||||
{
|
||||
{
|
||||
return util::apply_visitor(detail::get_view_offset_visitor(),*this);
|
||||
}
|
||||
|
||||
double image_view_any::get_scaling() const
|
||||
{
|
||||
{
|
||||
return util::apply_visitor(detail::get_view_scaling_visitor(),*this);
|
||||
}
|
||||
|
||||
image_dtype image_view_any::get_dtype() const
|
||||
{
|
||||
{
|
||||
return util::apply_visitor(detail::get_view_dtype_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);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ struct main_marker_visitor
|
|||
std::clog << "svg2png error: '" << svg_name_ << "' is not a valid vector!\n";
|
||||
return_value_ = -1;
|
||||
}
|
||||
|
||||
|
||||
void operator() (mapnik::marker_rgba8 const&)
|
||||
{
|
||||
std::clog << "svg2png error: '" << svg_name_ << "' is not a valid vector!\n";
|
||||
|
@ -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