You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Ward, Christopher" <ch...@metoffice.com> on 2002/10/10 16:34:43 UTC

Patch for SVG scaling in external-graphic

As I have only been looking at the code for a couple of hours and I do not
have CVS access at work I am attaching a patch. If this is not the correct
way to send patches I appologise.

It would seem that GIFs and JPEGs are automatically scaled to be the full
size of the area into which they are to be dispayed (as defined by width=""
and height=="). However SVG images are not scaled. This is because the width
and height are not passed from PDFRenderer.drawImageScaled() to
PDFRenderer.renderSVGDocument().

This patch added a width and height to the renderSVGDocument() method and
uses them to correclty scale the SVG content to the size oft he Image Area.

As I have only been looking at the code for a couple of hours I am sure tht
this is not the best way to approach this problem, but it should give
someone more experienced a base to work from.

regards,
Frugal


 <<svg_scale.patch>>