/** * Get scaled image. */ public synchronized BufferedImage getAsBitmapForSize( int width, int height ) { String key = width + "x" + height; BufferedImage result = cache.get( key ); if ( result == null ) { result = createBitmap( width, height ); renderSimple( result ); cache.put( key, result ); } return result; }
@Override protected Image renderSimple( Device device, int width, int height ) { BufferedImage area = SwingUniversalImage.createBitmap( width, height ); Graphics2D gc = SwingUniversalImage.createGraphics( area ); SwingUniversalImageSvg.render( gc, svgGraphicsNode, svgGraphicsSize, width / 2, height / 2, width, height, 0 ); gc.dispose(); return swing2swt( device, area ); }