From 9ea2a69bfdc6ffd12bf27c1e9003cd8bc0837549 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 9 May 2018 00:23:56 +0200 Subject: [PATCH] Corrected issue on rectangle drawing --- src/textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textures.c b/src/textures.c index 56d2aa86..cb566c5e 100644 --- a/src/textures.c +++ b/src/textures.c @@ -2029,7 +2029,7 @@ void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float sc // Draw a part of a texture (defined by a rectangle) void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint) { - Rectangle destRec = { position.x, position.y, sourceRec.width, sourceRec.height }; + Rectangle destRec = { position.x, position.y, sourceRec.width, fabsf(sourceRec.height) }; Vector2 origin = { 0, 0 }; DrawTexturePro(texture, sourceRec, destRec, origin, 0.0f, tint);