ensure agg rendering buffer uses proper dimensions since these may become more dynamic in the near future - refs #1478
This commit is contained in:
parent
1653229ffd
commit
f999615cec
6 changed files with 10 additions and 10 deletions
|
@ -57,7 +57,7 @@ void agg_renderer<T>::process(building_symbolizer const& sym,
|
|||
typedef agg::renderer_base<agg::pixfmt_rgba32> ren_base;
|
||||
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),width_,height_, width_ * 4);
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),current_buffer_->width(),current_buffer_->height(), current_buffer_->width() * 4);
|
||||
agg::pixfmt_rgba32 pixf(buf);
|
||||
ren_base renb(pixf);
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ void agg_renderer<T>::process(line_pattern_symbolizer const& sym,
|
|||
|
||||
if (!pat) return;
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),width_,height_, width_ * 4);
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),current_buffer_->width(),current_buffer_->height(), current_buffer_->width() * 4);
|
||||
pixfmt_type pixf(buf);
|
||||
pixf.comp_op(static_cast<agg::comp_op_e>(sym.comp_op()));
|
||||
renderer_base ren_base(pixf);
|
||||
|
|
|
@ -73,7 +73,7 @@ void agg_renderer<T>::process(line_symbolizer const& sym,
|
|||
gamma_ = stroke_.get_gamma();
|
||||
}
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),width_,height_, width_ * 4);
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),current_buffer_->width(),current_buffer_->height(), current_buffer_->width() * 4);
|
||||
|
||||
typedef agg::rgba8 color_type;
|
||||
typedef agg::order_rgba order_type;
|
||||
|
|
|
@ -127,7 +127,7 @@ void agg_renderer<T>::process(markers_symbolizer const& sym,
|
|||
coord2d center = bbox.center();
|
||||
agg::trans_affine_translation recenter(-center.x, -center.y);
|
||||
agg::trans_affine marker_trans = recenter * tr;
|
||||
buf_type render_buffer(current_buffer_->raw_data(), width_, height_, width_ * 4);
|
||||
buf_type render_buffer(current_buffer_->raw_data(), current_buffer_->width(), current_buffer_->height(), current_buffer_->width() * 4);
|
||||
dispatch_type rasterizer_dispatch(render_buffer,
|
||||
svg_renderer,
|
||||
*ras_ptr,
|
||||
|
@ -167,7 +167,7 @@ void agg_renderer<T>::process(markers_symbolizer const& sym,
|
|||
svg_attribute_type attributes;
|
||||
bool result = push_explicit_style( (*stock_vector_marker)->attributes(), attributes, sym);
|
||||
svg_renderer_type svg_renderer(svg_path, result ? attributes : (*stock_vector_marker)->attributes());
|
||||
buf_type render_buffer(current_buffer_->raw_data(), width_, height_, width_ * 4);
|
||||
buf_type render_buffer(current_buffer_->raw_data(), current_buffer_->width(), current_buffer_->height(), current_buffer_->width() * 4);
|
||||
dispatch_type rasterizer_dispatch(render_buffer,
|
||||
svg_renderer,
|
||||
*ras_ptr,
|
||||
|
@ -205,7 +205,7 @@ void agg_renderer<T>::process(markers_symbolizer const& sym,
|
|||
agg::trans_affine marker_trans = recenter * tr;
|
||||
boost::optional<mapnik::image_ptr> marker = (*mark)->get_bitmap_data();
|
||||
typedef raster_markers_rasterizer_dispatch<buf_type,rasterizer, detector_type> dispatch_type;
|
||||
buf_type render_buffer(current_buffer_->raw_data(), width_, height_, width_ * 4);
|
||||
buf_type render_buffer(current_buffer_->raw_data(), current_buffer_->width(), current_buffer_->height(), current_buffer_->width() * 4);
|
||||
dispatch_type rasterizer_dispatch(render_buffer,
|
||||
*ras_ptr,
|
||||
**marker,
|
||||
|
|
|
@ -59,7 +59,7 @@ void agg_renderer<T>::process(polygon_pattern_symbolizer const& sym,
|
|||
typedef agg::conv_clip_polygon<geometry_type> clipped_geometry_type;
|
||||
typedef coord_transform<CoordTransform,clipped_geometry_type> path_type;
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(), width_, height_, width_ * 4);
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(), current_buffer_->width(), current_buffer_->height(), current_buffer_->width() * 4);
|
||||
ras_ptr->reset();
|
||||
if (sym.get_gamma() != gamma_ || sym.get_gamma_method() != gamma_method_)
|
||||
{
|
||||
|
@ -135,8 +135,8 @@ void agg_renderer<T>::process(polygon_pattern_symbolizer const& sym,
|
|||
path_type path(t_,clipped,prj_trans);
|
||||
path.vertex(&x0,&y0);
|
||||
}
|
||||
offset_x = unsigned(width_ - x0);
|
||||
offset_y = unsigned(height_ - y0);
|
||||
offset_x = unsigned(current_buffer_->width() - x0);
|
||||
offset_y = unsigned(current_buffer_->height() - y0);
|
||||
}
|
||||
|
||||
span_gen_type sg(img_src, offset_x, offset_y);
|
||||
|
|
|
@ -76,7 +76,7 @@ void agg_renderer<T>::process(polygon_symbolizer const& sym,
|
|||
}
|
||||
}
|
||||
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),width_,height_, width_ * 4);
|
||||
agg::rendering_buffer buf(current_buffer_->raw_data(),current_buffer_->width(),current_buffer_->height(), current_buffer_->width() * 4);
|
||||
|
||||
color const& fill = sym.get_fill();
|
||||
unsigned r=fill.red();
|
||||
|
|
Loading…
Reference in a new issue