Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复计算绘制区时计算失误 #9

Merged
merged 1 commit into from
Apr 12, 2020

Conversation

chirsz-ever
Copy link
Collaborator

当源图像的绘制部分超出目标的裁剪区时,EGE 在计算实际绘制区域时会少
算 1 行和 1 列。

复现代码:

#include "ege.h"
int main()
{
	ege::initgraph(600, 400);
	ege::setbkcolor(ege::YELLOW);

	ege::PIMAGE rect = ege::newimage();
	ege::resize(rect, 200, 200);
	ege::setbkcolor_f(ege::BLUE, rect);
	ege::cleardevice(rect);

	ege::putimage_alphablend(NULL, rect, 500, 300, 255);

	ege::getch();
	ege::closegraph();
	return 0;
}

运行结果:
图片

可见最右列和最底行仍然是背景色黄色

当源图像的绘制部分超出目标的裁剪区时,EGE 在计算实际绘制区域时会少
算 1 行和 1 列。
chirsz-ever added a commit to chirsz-ever/microui-impl-ege that referenced this pull request Mar 19, 2020
@chirsz-ever chirsz-ever mentioned this pull request Apr 1, 2020
4 tasks
@wysaid wysaid merged commit c89abc3 into wysaid:master Apr 12, 2020
@chirsz-ever chirsz-ever deleted the fix-2020-03 branch April 12, 2020 13:10
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Apr 14, 2020
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 7, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 13, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 14, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 20, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 20, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 20, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 20, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 20, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 20, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
FrankHB added a commit to FrankHB/YEGE that referenced this pull request Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants