an awful lot of tweaks to drawing details

This commit is contained in:
Paul Davis 2013-06-24 16:28:53 -04:00
parent 0ce393f051
commit a1f858d3b2
12 changed files with 169 additions and 130 deletions

View file

@ -56,10 +56,15 @@ void
Line::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const
{
setup_outline_context (context);
Duple p0 = item_to_window (Duple (_points[0].x, _points[0].y));
Duple p1 = item_to_window (Duple (_points[1].x, _points[1].y));
context->move_to (p0.x, p0.y);
context->line_to (p1.x, p1.y);
/* See Cairo FAQ on single pixel lines to understand why we add 0.5
*/
context->move_to (p0.x + 0.5, p0.y + 0.5);
context->line_to (p1.x + 0.5, p1.y + 0.5);
context->stroke ();
}