try to fix rounding errors

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4299 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-05-30 14:56:13 +00:00
parent 67c8370f50
commit e093e5e80c

View File

@ -454,7 +454,9 @@ void mathed_draw_deco(MathPainterInfo & pain, int x, int y, int w, int h,
else else
mt.transform(xx, yy); mt.transform(xx, yy);
mt.transform(x2, y2); mt.transform(x2, y2);
pain.pain.line(x + int(xx), y + int(yy), x + int(x2), y + int(y2), pain.pain.line(
x + int(xx + 0.5), y + int(yy + 0.5),
x + int(x2 + 0.5), y + int(y2 + 0.5),
LColor::math); LColor::math);
} else { } else {
int xp[32]; int xp[32];
@ -468,8 +470,8 @@ void mathed_draw_deco(MathPainterInfo & pain, int x, int y, int w, int h,
sqmt.transform(xx, yy); sqmt.transform(xx, yy);
else else
mt.transform(xx, yy); mt.transform(xx, yy);
xp[j] = x + int(xx); xp[j] = x + int(xx + 0.5);
yp[j] = y + int(yy); yp[j] = y + int(yy + 0.5);
// lyxerr << "P[" << j " " << xx << " " << yy << " " << x << " " << y << "]"; // lyxerr << "P[" << j " " << xx << " " << yy << " " << x << " " << y << "]";
} }
pain.pain.lines(xp, yp, n, LColor::math); pain.pain.lines(xp, yp, n, LColor::math);