summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_posewidget
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-10 04:38:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-10 04:38:23 +0100
commit0c54288d05811ab1b5d7e2f4378189fb23da792c (patch)
tree4d65ccce355c8d24b0dcc130645baf2974e13a05 /ftnoir_posewidget
parent3bc46979c76cd13b10ba0215804962f1e3904c5c (diff)
fix interpolation jaggies
Diffstat (limited to 'ftnoir_posewidget')
-rw-r--r--ftnoir_posewidget/glwidget.cpp8
1 files changed, 4 insertions, 4 deletions
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<int>(ow - 1, std::max<int>(0, qx - 0.5));
- int qy1 = std::min<int>(oh - 1, std::max<int>(0, qy - 0.5));
- int qx2 = std::min<int>(ow - 1, std::max<int>(0, qx + 0.5));
- int qy2 = std::min<int>(oh - 1, std::max<int>(0, qy + 0.5));
+ int qx1 = std::min<int>(ow - 1, std::max<int>(0, qx));
+ int qy1 = std::min<int>(oh - 1, std::max<int>(0, qy));
+ int qx2 = std::min<int>(ow - 1, std::max<int>(0, qx + 1.0));
+ int qy2 = std::min<int>(oh - 1, std::max<int>(0, qy + 1.0));
double dx1 = qx1 - qx;
double dy1 = qy1 - qy;