xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mall ...@arcus.com.au>
Subject Re: How to rasterize a SVG but not preserving the aspect ratio?
Date Sat, 14 Jan 2006 13:09:48 GMT

thank you, that clarifies the situation. I am moving the thread to 
fop-dev for further considerations.

On Sat, 14 Jan 2006 08:54 pm, thomas.deweese@kodak.com wrote:
> Hi Manuel,
> Manuel Mall <manuel@apache.org> wrote on 01/13/2006 11:04:59 PM:
> > I need to rasterize SVGs but need in some cases apply non-uniform
> > scaling. The transformers I have seen and sample code I came across
> > always uses uniform scaling, i.e. preserve the aspect ratio.
>    No the transformers respect the 'preserveAspectRatio' attribute
> on the root SVG element.  The default for this is "xMidYMid meet"
> if this is set to "none" then the Transcoders should stretched
> non-uniformly.
> > The context is that I am currently writing a new renderer for FOP
> > for an
> >
> > output format that doesn't support SVG. Therefore I need to convert
> > the SVG into a raster format and for SVGs included as
> > external-graphics I need to be able to 'obey' the possibly
> > non-uniform scaling specified on the external-graphics element in
> > the XSL-FO document.
>    This is an interesting case of 'who should win'.

Yes it is interesting - what do fop-dev's think about this? What does 
the PDF SVG transcoder do in this case? I assume from FOP's perspective 
XSL-FO should win? Same as for other images formats which we happily 
distort if the FO tells us so?

> > Is there an easy way to do this?
>    The simplest thing is to adjust the preserveAspectRatio
> attribute on the root of the SVG tree before passing it to
> the transcoder.


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

View raw message