artemp/trac2github — Issue #99: [SOLUTION] Text labels cut on render edge
Author: artemp
Created: 2011-10-09 20:13:04+00:00
State: open
Labels: Core_Library

{{{
Index: src/cairo_renderer.cpp
===================================================================
--- src/cairo_renderer.cpp	(revision 700)
+++ src/cairo_renderer.cpp	(working copy)
@@ -469,7 +469,8 @@
surface_(surface),
context_(Cairo::Context::create(surface)),
t_(m.getWidth(),m.getHeight(),m.getCurrentExtent(),offset_x,offset_y),
- detector_(Envelope(-64 ,-64, m.getWidth() + 64 ,m.getHeight() + 64))
+ //detector_(Envelope(-64 ,-64, m.getWidth() + 64 ,m.getHeight() + 64))
+ detector_(Envelope(0 ,0, m.getWidth(),m.getHeight()))
{
#ifdef MAPNIK_DEBUG
std::clog << "scale=" << m.scale() << "\n";
Index: src/agg_renderer.cpp
===================================================================
--- src/agg_renderer.cpp	(revision 700)
+++ src/agg_renderer.cpp	(working copy)
@@ -112,7 +112,8 @@
t_(m.getWidth(),m.getHeight(),m.getCurrentExtent(),offset_x,offset_y),
font_engine_(),
font_manager_(font_engine_),
- detector_(Envelope(-64 ,-64, m.getWidth() + 64 ,m.getHeight() + 64)),
+ //detector_(Envelope(-64 ,-64, m.getWidth() + 64 ,m.getHeight() + 64)),
+ detector_(Envelope(0 ,0, m.getWidth() ,m.getHeight())),
ras_ptr(new rasterizer)
{Thio
boost::optional bg = m.background();
}}}

What the reason for 64 offsets? As I understand this is reason for label cut on image edges