Canvas Content Shift
james.graham at oracle.com
Fri Apr 14 20:19:26 UTC 2017
On 4/14/17 7:36 AM, Michael Paus wrote:
> For my Mac (Retina) I know that the renderScale is 2.0 but how do you find that out in the general case?
In JDK 9 you have:
Window.outputScaleX/Y (read-only double properties, based on Screen values)
Window.renderScaleX/Y (get/set double properties, default to output scales)
Window.forceIntegerRenderScale (get/set boolean property)
In the case of Canvas, though, since we can't re-render currently (we have an outstanding wish-list item to add
invalidation and repaint capabilities to it so we can make the data non-persistent) we have to choose the largest
rendering scale that we might ever need - which is basically the max of all of the Screen output scales.
We need to add (for 10, too late for 9):
Canvas.renderScaleX/Y properties, gettable for all, settable only for non-persistent canvas objects
Canvas.repaint/validate/etc. for enabling non-persistence
More information about the openjfx-dev