xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Export jpeg/tif/png saves only visible area of the image
Date Wed, 10 May 2006 12:19:13 GMT
Hi Sudhakar,

        Please read:
 http://xmlgraphics.apache.org/batik/rasterizerTutorial.html

Sudhakar S <yessudhakar@hotmail.com> wrote on 05/10/2006 08:09:43 AM:

> 
> Hi Thomas,
> 
> I have tried to clone the document and calculated the size using
> renderingTransform  also i have passed the cloned document to transcode
> method. But after this i dont know how to proceed and how to write 
image. So
> can you please give some more information to create scaled jpeg/tif/png
> images.
> 
> 
> DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
> final Document d =
> DOMUtilities.deepCloneDocument(svgCanvas.getSVGDocument(), impl);
> 
> AffineTransform att = svgCanvas.getRenderingTransform();
> Rectangle canvasRect = svgCanvas.getBounds();
> AffineTransform itrans = att.createInverse();
> Rectangle rect = itrans.createTransformedShape(canvasRect).getBounds();
> double w = rect.getWidth() * docWidth;
> double h = rect.getHeight() * docHeight;
> 
> Thanks,
> Sudhakar
> --
> View this message in context: 
http://www.nabble.com/Export-jpeg-tif-png-saves-
> only-visible-area-of-the-image-t1589363.html#a4318132
> Sent from the Batik - Users forum at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message