Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "no need for premultiplied types in warper"

This reverts commit 61e8a9c.
  • Loading branch information...
commit f3589ab4f95a46c5c09812b637fe03dbc33e8b20 1 parent 657098f
@springmeyer springmeyer authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/warp.cpp
View
10 src/warp.cpp
@@ -78,6 +78,8 @@ void reproject_and_scale_raster(raster & target, raster const& source,
typedef agg::pixfmt_rgba32 pixfmt;
typedef pixfmt::color_type color_type;
typedef agg::renderer_base<pixfmt> renderer_base;
+ typedef agg::pixfmt_rgba32_pre pixfmt_pre;
+ typedef agg::renderer_base<pixfmt_pre> renderer_base_pre;
agg::rasterizer_scanline_aa<> rasterizer;
agg::scanline_u8 scanline;
@@ -85,8 +87,8 @@ void reproject_and_scale_raster(raster & target, raster const& source,
target.data_.width(),
target.data_.height(),
target.data_.width()*4);
- pixfmt pixf(buf);
- renderer_base rb(pixf);
+ pixfmt_pre pixf_pre(buf);
+ renderer_base_pre rb_pre(pixf_pre);
rasterizer.clip_box(0, 0, target.data_.width(), target.data_.height());
agg::rendering_buffer buf_tile(
(unsigned char*)source.data_.getData(),
@@ -176,13 +178,13 @@ void reproject_and_scale_raster(raster & target, raster const& source,
<img_accessor_type, interpolator_type>
span_gen_type;
span_gen_type sg(ia, interpolator);
- agg::render_scanlines_aa(rasterizer, scanline, rb,
+ agg::render_scanlines_aa(rasterizer, scanline, rb_pre,
sa, sg);
} else {
typedef mapnik::span_image_resample_rgba_affine
<img_accessor_type> span_gen_type;
span_gen_type sg(ia, interpolator, filter);
- agg::render_scanlines_aa(rasterizer, scanline, rb,
+ agg::render_scanlines_aa(rasterizer, scanline, rb_pre,
sa, sg);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.