Graphics2D g = dst.createGraphics();
clip = g.getClip();
g.clipRect( 0, 0, width, h );
g.drawRenderedImage( src, null );
g.setClip( clip );
g.clipRect( 0, h+d, width, height-h-d );
g.translate( 0, 2*h+d );
g.scale( 1, -1 );
g.drawRenderedImage( src, null );
g.setPaint( new GradientPaint( 0, 0, new Color( 1.0f, 0.0f, 0.0f, 0.0f ), 0, h, new Color( 0.0f, 1.0f, 0.0f, opacity ) ) );
g.setComposite( AlphaComposite.getInstance( AlphaComposite.DST_IN ) );