-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
fix drawLine wrong when thickness!=1 #2327
Conversation
@NgVThangBz
DrawNode .h: Maybe this is better:
Please also add a cpp tester which test different factors or at least the |
@NgVThangBz |
@aismann If the content scale factor is changed at runtime (such as due to screen resolution changes), then the above cannot be in the constructor. If it changes after the DrawNode is created, the resulting output will be incorrect. |
@aismann factor != AX_CONTENT_SCALE_FACTOR()
and as @rh101 mentioned, if set in constructor it will not be accurate |
@NgVThangBz It may be better to do as @aismann suggested, which is to close this PR and let him submit one. The reason is that @aismann is very familiar with the DrawNode implementation, and a change like this has a wide impact, so it may require more test cases, which you have not added to this PR. |
@NgVThangBz You switch to "width":
What is your reason to use 'width' instead of 'height'? I think your solution is sometimes not a correct value because the factor between |
I will close my PR, and @aismann will continue |
fix drawLine with thickness other than 1
factor = (FrameSize /designResolutionSize)*2
and the smallest thickness that axmol can create is 1,
so in all cases where the thickness is <1 I think we should draw a line with thickness = 1
See detailed error at #2324
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."
I have performed a self-review of my code.
Optional:
For core/new feature PR