瀏覽代碼

DrawTextureRec() function review to allow flipped rectangle

pull/66/head
raysan5 9 年之前
父節點
當前提交
2bd7245508
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/textures.c

+ 1
- 1
src/textures.c 查看文件

@ -1206,7 +1206,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 = { (int)position.x, (int)position.y, sourceRec.width, sourceRec.height };
Rectangle destRec = { (int)position.x, (int)position.y, abs(sourceRec.width), abs(sourceRec.height) };
Vector2 origin = { 0, 0 };
DrawTexturePro(texture, sourceRec, destRec, origin, 0.0f, tint);

Loading…
取消
儲存