* 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:
parent
a907e70198
commit
ae540011ed
@ -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();
|
fPath.remove_all();
|
||||||
|
|
||||||
if (a == b) {
|
if (a == b) {
|
||||||
@ -379,10 +364,12 @@ Painter::StrokeLine(BPoint a, BPoint b)
|
|||||||
touched = _FillPath(fPath);
|
touched = _FillPath(fPath);
|
||||||
} else {
|
} else {
|
||||||
// do the pixel center offset here
|
// do the pixel center offset here
|
||||||
|
if (!fSubpixelPrecise && fmodf(fPenSize, 2.0) != 0.0) {
|
||||||
a.x += 0.5;
|
a.x += 0.5;
|
||||||
a.y += 0.5;
|
a.y += 0.5;
|
||||||
b.x += 0.5;
|
b.x += 0.5;
|
||||||
b.y += 0.5;
|
b.y += 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
fPath.move_to(a.x, a.y);
|
fPath.move_to(a.x, a.y);
|
||||||
fPath.line_to(b.x, b.y);
|
fPath.line_to(b.x, b.y);
|
||||||
|
Loading…
Reference in New Issue
Block a user