E
Elliot
Hi all,
I'm using the following code to scale a jpg that I've loaded off disk
in a Java application:
Graphics2D g2d = (Graphics2D)g;
g2d.translate(x0,y0 );
g2d.scale( scaleFactor,scaleFactor );
AffineTransform at = AffineTransform.getTranslateInstance(x0,y0);
BufferedImage bufImage = this.toBufferedImage(this.imgSource);
g2d.drawRenderedImage(bufImage, at);
The image scales correctly as determined by "scaleFactor", however I
also have some rectangles on the same page and they are scaling as
well. How do I apply the transformation just to the image and not to
everything else on the page?
Thanks
Elliot
I'm using the following code to scale a jpg that I've loaded off disk
in a Java application:
Graphics2D g2d = (Graphics2D)g;
g2d.translate(x0,y0 );
g2d.scale( scaleFactor,scaleFactor );
AffineTransform at = AffineTransform.getTranslateInstance(x0,y0);
BufferedImage bufImage = this.toBufferedImage(this.imgSource);
g2d.drawRenderedImage(bufImage, at);
The image scales correctly as determined by "scaleFactor", however I
also have some rectangles on the same page and they are scaling as
well. How do I apply the transformation just to the image and not to
everything else on the page?
Thanks
Elliot