* when the layout branch was merged, the same problem

got fixed twice, any unoptimized lines were drawn at
  a (0.5, 0.5) offset


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18841 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2006-09-14 18:00:09 +00:00
parent a907e70198
commit ae540011ed

View File

@ -352,21 +352,6 @@ Painter::StrokeLine(BPoint a, BPoint b)
}
}
// do the pixel center offset here
// TODO review this :
// in case it's the same pixel, we offset differently to have something drawn
if (a == b) {
a.x += 0.25;
a.y += 0.25;
b.x += 0.75;
b.y += 0.75;
} else {
a.x += 0.5;
a.y += 0.5;
b.x += 0.5;
b.y += 0.5;
}
fPath.remove_all();
if (a == b) {
@ -379,10 +364,12 @@ Painter::StrokeLine(BPoint a, BPoint b)
touched = _FillPath(fPath);
} else {
// do the pixel center offset here
a.x += 0.5;
a.y += 0.5;
b.x += 0.5;
b.y += 0.5;
if (!fSubpixelPrecise && fmodf(fPenSize, 2.0) != 0.0) {
a.x += 0.5;
a.y += 0.5;
b.x += 0.5;
b.y += 0.5;
}
fPath.move_to(a.x, a.y);
fPath.line_to(b.x, b.y);