Corrected issue on rectangle drawing
This commit is contained in:
parent
6884d3bc14
commit
9ea2a69bfd
@ -2029,7 +2029,7 @@ void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float sc
|
|||||||
// Draw a part of a texture (defined by a rectangle)
|
// Draw a part of a texture (defined by a rectangle)
|
||||||
void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint)
|
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 };
|
Vector2 origin = { 0, 0 };
|
||||||
|
|
||||||
DrawTexturePro(texture, sourceRec, destRec, origin, 0.0f, tint);
|
DrawTexturePro(texture, sourceRec, destRec, origin, 0.0f, tint);
|
||||||
|
Loading…
Reference in New Issue
Block a user