Change resolution of an offscreen image

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Change resolution of an offscreen image

Martin
Hi,

On Retina/HiDPI display, JOGL smartly adapts rendering by increasing the number of pixel for a frame. If I want to avoid this I use canvas.setSurfaceScale(...)! As a natural consequence, text appear smaller as font size are defined in terms of pixels.



When I render charts offscreen, I specify them in terms of image size. Text appear bigger than for Retina/HiDPI display, which is not surprising.



I want the text to appear the same size in the offscreen image than in an HiDPI frame. I think that I should simply double the image size (1200x1200 instead of 600x600) and then consider the user opening this image will unzoom it in the displaying app. Would anyone suggest something better ? I looked for GLOffscreenAutoDrawable.setSurfaceScale(..) or GLOffscreenAutoDrawable.get*Surface().setSurfaceScale(..) without success.