fix conditional pixel snapping for marker rasters
This commit is contained in:
parent
3412c071ab
commit
c6a291271f
2 changed files with 16 additions and 5 deletions
|
@ -241,11 +241,22 @@ struct raster_markers_rasterizer_dispatch : mapnik::noncopyable
|
||||||
{
|
{
|
||||||
agg::rendering_buffer src_buffer((unsigned char *)src_.getBytes(),src_.width(),src_.height(),src_.width() * 4);
|
agg::rendering_buffer src_buffer((unsigned char *)src_.getBytes(),src_.width(),src_.height(),src_.width() * 4);
|
||||||
pixfmt_pre pixf_mask(src_buffer);
|
pixfmt_pre pixf_mask(src_buffer);
|
||||||
renb_.blend_from(pixf_mask,
|
if (snap_to_pixels_)
|
||||||
0,
|
{
|
||||||
std::floor(marker_tr.tx + .5),
|
renb_.blend_from(pixf_mask,
|
||||||
std::floor(marker_tr.ty + .5),
|
0,
|
||||||
unsigned(255*opacity));
|
std::floor(marker_tr.tx + .5),
|
||||||
|
std::floor(marker_tr.ty + .5),
|
||||||
|
unsigned(255*opacity));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
renb_.blend_from(pixf_mask,
|
||||||
|
0,
|
||||||
|
marker_tr.tx,
|
||||||
|
marker_tr.ty,
|
||||||
|
unsigned(255*opacity));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Loading…
Reference in a new issue