13
0

tweak position of pango-rendered text image on canvas by 2 pixels upward

this is an arbitrary tweak but seems to work well thus far
This commit is contained in:
Paul Davis 2013-06-26 12:29:44 -04:00
parent d299e41a61
commit 2c3d570582

View File

@ -90,6 +90,7 @@ Text::redraw (Cairo::RefPtr<Cairo::Context> context) const
/* and draw, in the appropriate color of course */
set_source_rgba (img_context, _color);
layout->show_in_cairo_context (img_context);
/* text has now been rendered in _image and is ready for blit in
@ -112,7 +113,7 @@ Text::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) cons
Rect self = item_to_window (Rect (0, 0, min (_clamped_width, _width), _height));
context->rectangle (self.x0, self.y0, self.width(), self.height());
context->set_source (_image, self.x0, self.y0);
context->set_source (_image, self.x0, self.y0 - 2);
context->fill ();
}