Thomas,

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, [EMAIL PROTECTED] wrote:
> Hi Manuel,
>
> Manuel Mall <[EMAIL PROTECTED]> 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.
>

Manuel

Reply via email to