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

About the software interface confusion caused by some codes in image.c #721

Open
mt-yu opened this issue Oct 12, 2021 · 0 comments
Open

Comments

@mt-yu
Copy link

mt-yu commented Oct 12, 2021

OS: Ubuntu18.04 Desktop.

In the main branch,
GdipDrawImageRectRect Function

Question code 1: L830
if (!gdip_near_zero(srcwidth - dstwidth) && !gdip_near_zero(srcheight - dstheight))

The following is a part of the picture display based on the winfrom development software interface:
image

The code is modified to ( only && to || )
if (!gdip_near_zero(srcwidth - dstwidth) || !gdip_near_zero(srcheight - dstheight))
the result is normal
image
Q1: I am not sure if I change && to || will it affect other places?

Question code 2: l825
filter = cairo_pattern_create_for_surface (preprocessed_image->surface);
cairo_pattern_set_filter (filter, gdip_get_cairo_filter (graphics->interpolation));

The above two pieces of code are not used. Causes the interface texture to appear gradient.
Comparison effect before and after code modification:
before fixing
image
After modification
image
The code is modified as follows
image

Q2: After the modification, the gradient disappeared, but you can clearly see that the chamfer in the upper left corner of the comparison chart above has become a right angle. Don't know what to do Eliminate the gradation, keep the chamfer?

Sorry!Since the company's intranet cannot upload github code, the problem can only be described in this way

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

No branches or pull requests

1 participant