Drawing HiDPI component to BufferedImage

2014-01-24 Thread Hendrik Schreiber
Hey, to animate a component, I usually draw it to a BufferedImage and then draw that image to the glass pane, where I can easily move it around without having to completely re-render the component all the time. Unfortunately, this technique does not work well on Retina/HiDPI displays, as I can'

Re: Drawing HiDPI component to BufferedImage

2014-01-24 Thread Alexander Scherbatiy
Hi Hendrik, The API that allows to create custom images for HiDPI displays is only under discussion now. It can be found in the thread: http://mail.openjdk.java.net/pipermail/awt-dev/2014-January/006775.html It also contains a link to the patch that allows SunGraphics2D class to correctly

Re: Drawing HiDPI component to BufferedImage

2014-01-24 Thread Hendrik Schreiber
On Jan 24, 2014, at 13:39, Alexander Scherbatiy wrote: > The API that allows to create custom images for HiDPI displays is only under > discussion now. > It can be found in the thread: > http://mail.openjdk.java.net/pipermail/awt-dev/2014-January/006775.html > It also contains a link to the pa

Re: Drawing HiDPI component to BufferedImage

2014-01-24 Thread Sergey Bylokhov
On 24.01.2014 17:23, Hendrik Schreiber wrote: On Jan 24, 2014, at 13:39, Alexander Scherbatiy wrote: The API that allows to create custom images for HiDPI displays is only under discussion now. It can be found in the thread: http://mail.openjdk.java.net/pipermail/awt-dev/2014-January/006775

Re: Drawing HiDPI component to BufferedImage

2014-01-24 Thread Hendrik Schreiber
On Jan 24, 2014, at 14:31, Sergey Bylokhov wrote: > You can draw the component to the VolatileImage. or you can create double > size bufferedimage and set scale on its graphics to 2. Drawing to a VolatileImage created via GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice

Re: Drawing HiDPI component to BufferedImage

2014-01-24 Thread Sergey Bylokhov
On 24.01.2014 18:20, Hendrik Schreiber wrote: However, your other suggestion (double size bufferedimage), does not work. Is this intended or a bug? What happen if you change l&f to the Nimbus? I suggest to file the new CR to investigate this. Thanks! -hendrik Here's a simple demo class.

Re: Drawing HiDPI component to BufferedImage

2014-01-24 Thread Hendrik Schreiber
On Jan 24, 2014, at 15:35, Sergey Bylokhov wrote: > On 24.01.2014 18:20, Hendrik Schreiber wrote: >> However, your other suggestion (double size bufferedimage), does not work. >> Is this intended or a bug? > What happen if you change l&f to the Nimbus? I suggest to file the new CR to > investi