From 010247f8b1aa0526d523683e2e94b0bb66130d02 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 3 Oct 2015 17:50:19 +0200 Subject: pose-widget: simplify --- pose-widget/glwidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pose-widget') diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp index 1e256104..3ee480a1 100644 --- a/pose-widget/glwidget.cpp +++ b/pose-widget/glwidget.cpp @@ -167,12 +167,12 @@ void GLWidget::project_quad_texture() { + uv.x() * (origs[i][2].y() - origs[i][0].y()) + uv.y() * (origs[i][1].y() - origs[i][0].y()); - const int px_ = std::max(0, fx + .5f); - const int py_ = std::max(0, fy + .5f); + const int px_ = fx + .5f; + const int py_ = fy + .5f; const int px = fx; const int py = fy; - const float ax_ = fabs(fx - px); - const float ay_ = fabs(fy - py); + const float ax_ = fx - px; + const float ay_ = fy - py; const float ax = 1.f - ax_; const float ay = 1.f - ay_; -- cgit v1.2.3