From 0c54288d05811ab1b5d7e2f4378189fb23da792c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 10 Dec 2013 04:38:23 +0100 Subject: fix interpolation jaggies --- ftnoir_posewidget/glwidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ftnoir_posewidget/glwidget.cpp') diff --git a/ftnoir_posewidget/glwidget.cpp b/ftnoir_posewidget/glwidget.cpp index 93c98c9c..70667f06 100644 --- a/ftnoir_posewidget/glwidget.cpp +++ b/ftnoir_posewidget/glwidget.cpp @@ -181,10 +181,10 @@ void GLWidget::project_quad_texture() { double qy = origs[i][0].y + coords.x * (origs[i][2].y - origs[i][0].y) + coords.y * (origs[i][1].y - origs[i][0].y); - int qx1 = std::min(ow - 1, std::max(0, qx - 0.5)); - int qy1 = std::min(oh - 1, std::max(0, qy - 0.5)); - int qx2 = std::min(ow - 1, std::max(0, qx + 0.5)); - int qy2 = std::min(oh - 1, std::max(0, qy + 0.5)); + int qx1 = std::min(ow - 1, std::max(0, qx)); + int qy1 = std::min(oh - 1, std::max(0, qy)); + int qx2 = std::min(ow - 1, std::max(0, qx + 1.0)); + int qy2 = std::min(oh - 1, std::max(0, qy + 1.0)); double dx1 = qx1 - qx; double dy1 = qy1 - qy; -- cgit v1.2.3