drawRenderedImage(image, AffineTransform). How do I get the width and height of renderedImage
<p>I'm drawing a transparent rendered image on top of a background image which is then displayed on a JPanel.</p>

<p>I need to get the bounds of the rendered image after it has been scaled and rotated. 
So that the next time I call repaint it can be with
the clip of the rendered image.</p>

<p>Any ideas? thanks for your help.</p>

<pre><code>@Override public void paintComponent(java.awt.Graphics g)
{
    if(g != null)
    {
        g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), null);
        Graphics2D g2 = (Graphics2D)g.create();
        double cx = sprite.getWidth()  / 2.0;
        double cy = sprite.getHeight() / 2.0;
        AffineTransform at = AffineTransform.getTranslateInstance(xPos, yPos);
        at.concatenate(AffineTransform.getScaleInstance(scale, scale));
        at.rotate(theta, cx, cy);
        g2.drawRenderedImage(sprite, at);

        //get width and height of rendered image here?

        g2.dispose();
     }
</code></pre>
