Browse Source

Removed the internal rounding applied to the x and y parameters of love.graphics.print/printf. Resolves issue #1062.

Alex Szpakowski 9 years ago
parent
commit
34b8e47831
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/modules/graphics/opengl/Font.cpp
  2. 1 1
      src/modules/graphics/opengl/Text.cpp

+ 2 - 2
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<GlyphVertex> vertices;
 	std::vector<GlyphVertex> vertices;
 	std::vector<DrawCommand> drawcommands = generateVertices(text, vertices);
 	std::vector<DrawCommand> 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);
 	printv(t, drawcommands, vertices);
 }
 }
@@ -637,7 +637,7 @@ void Font::printf(const std::string &text, float x, float y, float wrap, AlignMo
 	std::vector<GlyphVertex> vertices;
 	std::vector<GlyphVertex> vertices;
 	std::vector<DrawCommand> drawcommands = generateVerticesFormatted(text, wrap, align, vertices);
 	std::vector<DrawCommand> 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);
 	printv(t, drawcommands, vertices);
 }
 }

+ 1 - 1
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);
 	const size_t stride = sizeof(Font::GlyphVertex);
 
 
 	OpenGL::TempTransform transform(gl);
 	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);
 		GLBuffer::Bind bind(*vbo);