There are some scenarios, e.g. with detached views in the IDE, where point to pixels conversion lead to unexpected results e.g. in something like this:
Point p = display.getCursorLocation();
p.x -= 100;
shell.setLocation(p);
If p.x -= 100; will lead to the point being placed on another monitor with different zoom, this can lead to a unexpected positioning of the shell.
Two ideas to evaluate:
1.) extend point and rectangle with a zoom attribute
2.) Create DisplayPoint and DisplayRectangle only for win32 as subclasses and use them in scenarios where a display related pixel to point conversion happen
There are some scenarios, e.g. with detached views in the IDE, where point to pixels conversion lead to unexpected results e.g. in something like this:
If p.x -= 100; will lead to the point being placed on another monitor with different zoom, this can lead to a unexpected positioning of the shell.
Two ideas to evaluate: 1.) extend point and rectangle with a zoom attribute
2.) Create DisplayPoint and DisplayRectangle only for win32 as subclasses and use them in scenarios where a display related pixel to point conversion happen