From 8efa2a5dbcfa00a483780b4ff448030729d8ffef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 15 Apr 2005 09:01:07 +0000 Subject: [PATCH] fixed one moree clipping bug with StrokeLine git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12404 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/drawing/Painter/Painter.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/servers/app/drawing/Painter/Painter.cpp b/src/servers/app/drawing/Painter/Painter.cpp index 91d652359c..fbe2726d0b 100644 --- a/src/servers/app/drawing/Painter/Painter.cpp +++ b/src/servers/app/drawing/Painter/Painter.cpp @@ -279,8 +279,10 @@ Painter::StrokeLine(BPoint a, BPoint b, DrawData* context) // do this as well, and it is probably hard to calculate // the correct location outside of AGGTextRenderer... - _Transform(&a); - _Transform(&b); + // "false" means not to do the pixel center offset, + // because it would mess up our optimized versions + _Transform(&a, false); + _Transform(&b, false); SetPenSize(context->pensize); @@ -317,6 +319,12 @@ Painter::StrokeLine(BPoint a, BPoint b, DrawData* context) } } + // do the pixel center offset here + a.x += 0.5; + a.y += 0.5; + b.x += 0.5; + b.y += 0.5; + agg::path_storage path; path.move_to(a.x, a.y); path.line_to(b.x, b.y);