From 34b8e478310c37173232fa897bc56fd98fc3478c Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 28 Oct 2015 01:59:53 -0300 Subject: [PATCH] Removed the internal rounding applied to the x and y parameters of love.graphics.print/printf. Resolves issue #1062. --- src/modules/graphics/opengl/Font.cpp | 4 ++-- src/modules/graphics/opengl/Text.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/graphics/opengl/Font.cpp b/src/modules/graphics/opengl/Font.cpp index 58572b8c3..968649745 100644 --- a/src/modules/graphics/opengl/Font.cpp +++ b/src/modules/graphics/opengl/Font.cpp @@ -627,7 +627,7 @@ void Font::print(const std::string &text, float x, float y, float angle, float s std::vector vertices; std::vector drawcommands = generateVertices(text, vertices); - Matrix4 t(ceilf(x), ceilf(y), angle, sx, sy, ox, oy, kx, ky); + Matrix4 t(x, y, angle, sx, sy, ox, oy, kx, ky); printv(t, drawcommands, vertices); } @@ -637,7 +637,7 @@ void Font::printf(const std::string &text, float x, float y, float wrap, AlignMo std::vector vertices; std::vector drawcommands = generateVerticesFormatted(text, wrap, align, vertices); - Matrix4 t(ceilf(x), ceilf(y), angle, sx, sy, ox, oy, kx, ky); + Matrix4 t(x, y, angle, sx, sy, ox, oy, kx, ky); printv(t, drawcommands, vertices); } diff --git a/src/modules/graphics/opengl/Text.cpp b/src/modules/graphics/opengl/Text.cpp index b87f4a38f..2e43e3db2 100644 --- a/src/modules/graphics/opengl/Text.cpp +++ b/src/modules/graphics/opengl/Text.cpp @@ -231,7 +231,7 @@ void Text::draw(float x, float y, float angle, float sx, float sy, float ox, flo const size_t stride = sizeof(Font::GlyphVertex); OpenGL::TempTransform transform(gl); - transform.get() *= Matrix4(ceilf(x), ceilf(y), angle, sx, sy, ox, oy, kx, ky); + transform.get() *= Matrix4(x, y, angle, sx, sy, ox, oy, kx, ky); { GLBuffer::Bind bind(*vbo);