浏览代码

rtextures: Fix ImageDraw() source clipping when drawing beyond top left (#3306)

pull/3307/head
Rob Loach 1年前
committed by GitHub
父节点
当前提交
30f8dd6e37
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/rtextures.c

+ 2
- 2
src/rtextures.c 查看文件

@ -3481,7 +3481,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
// Destination rectangle out-of-bounds security checks
if (dstRec.x < 0)
{
srcRec.x = -dstRec.x;
srcRec.x -= dstRec.x;
srcRec.width += dstRec.x;
dstRec.x = 0;
}
@ -3489,7 +3489,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
if (dstRec.y < 0)
{
srcRec.y = -dstRec.y;
srcRec.y -= dstRec.y;
srcRec.height += dstRec.y;
dstRec.y = 0;
}

正在加载...
取消
保存