From 3fa1d0e03dab8b8a9f2b10cc4d0f245036f80344 Mon Sep 17 00:00:00 2001 From: Remco van Oosterhout Date: Wed, 14 May 2014 16:25:49 +0200 Subject: [PATCH] Fixed issue where the viewport's width and/or height could be off by 1 pixel Signed-off-by: Stefan Schindler --- src/SFML/Graphics/RenderTarget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index a429bed15..5fa6cccd0 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -133,8 +133,8 @@ IntRect RenderTarget::getViewport(const View& view) const return IntRect(static_cast(0.5f + width * viewport.left), static_cast(0.5f + height * viewport.top), - static_cast(width * viewport.width), - static_cast(height * viewport.height)); + static_cast(0.5f + width * viewport.width), + static_cast(0.5f + height * viewport.height)); }