diff options
| author | Ray <raysan5@gmail.com> | 2018-05-09 00:23:56 +0200 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2018-05-09 00:23:56 +0200 |
| commit | 9ea2a69bfdc6ffd12bf27c1e9003cd8bc0837549 (patch) | |
| tree | 593258d2edd0b1669108f5aa891e763fd06e0355 /src | |
| parent | 6884d3bc14986a8f1e38128b1bfbc93a48e46c75 (diff) | |
| download | raylib-9ea2a69bfdc6ffd12bf27c1e9003cd8bc0837549.tar.gz raylib-9ea2a69bfdc6ffd12bf27c1e9003cd8bc0837549.zip | |
Corrected issue on rectangle drawing
Diffstat (limited to 'src')
| -rw-r--r-- | src/textures.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
