-
Notifications
You must be signed in to change notification settings - Fork 177
Use Rectangle.OfFloat in Widgets getter/setter #2315
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
base: master
Are you sure you want to change the base?
Use Rectangle.OfFloat in Widgets getter/setter #2315
Conversation
c1712f2
to
f4b62c6
Compare
Test Results 539 files - 7 539 suites - 7 34m 35s ⏱️ + 7m 38s For more details on these errors, see this check. Results for commit 7c98ed4. ± Comparison against base commit 34a4d76. This pull request removes 54 tests.
♻️ This comment has been updated with latest results. |
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
Outdated
Show resolved
Hide resolved
I notice many methods are being updated to return Point.OfFloat or Rectangle.OfFloat, should this be also changed in function definitions? |
Changing the return type changes the API, which is not allowed. Moreover, Rectangle.OfFloat and Point.OfFloat are children of Rectangle and Point respectively. So we don't need to do so also allowing better abstraction. |
f4b62c6
to
f3120a1
Compare
f3120a1
to
8540ca5
Compare
This commit introduces the use of Rectangle.OfFloat and Point.OfFloat in win32 Widgets' getters and setter for a better precision. contributes to eclipse-platform#62
8540ca5
to
7c98ed4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the proposal, @amartya4256 . Is there any visual effect/issue that is solved by this PR? Put otherwise: where exactly do we need more precision when working with rectangles/points?
I ask because the PR is quite big and exposes some (still) internal details like the fact that one needs to instantiate internal classes (OfFloat) to achieve the desired precision.
As discussed, we will not merge it now and rather only introduce OfFloat in places where necessary. I'll keep this PR as a draft till then. |
This PR introduces Rectangle.OfFloat & Point.OfFloat while using the getter / setter of a win32 widget to have better precision while scaling them up.
contributes to #62