W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2007

Re: 'scale-to-fit' in both directions

From: Tony Graham <Tony.Graham@MenteithConsulting.com>
Date: Tue, 21 Aug 2007 08:41:44 +0100
To: www-xsl-fo@w3.org
Message-ID: <87lkc52v2f.fsf@zako.menteithconsulting.com>

On Fri, Aug 17 2007 12:19:30 +0100, john@pixware.fr wrote:
> Given this XSL-FO fragment:
>
>   <fo:external-graphic
>     border="solid 1pt"
>     content-height="scale-to-fit"
>     content-width="scale-to-fit"
>     height="2in"
>     width="5in"
>     src="url(images/flower1.jpeg)"
>   />
>
> I would have expected the content size to match exactly the viewport
> size, possibly leading to non-uniform scaling. It seems that XEP has a
> different interpretation, as it preserves the original aspect ratio
> (see attached PDF). Is that the correct behaviour? (This is the result
> I would expect with 'content-width' set to 'auto' instead of
> scale-to-fit').

Add 'scaling="non-uniform"': the initial value of 'scaling' is
'uniform'.  See
http://www.w3.org/TR/2006/REC-xsl11-20061205/#scaling

Regards,


Tony Graham.
======================================================================
Tony.Graham@MenteithConsulting.com   http://www.menteithconsulting.com

Menteith Consulting Ltd             Registered in Ireland - No. 428599
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
----------------------------------------------------------------------
Menteith Consulting -- Understanding how markup works
======================================================================
Received on Tuesday, 21 August 2007 07:41:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:14 GMT