You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Kai Mütz <km...@web.de> on 2007/02/08 19:45:25 UTC

Again: external-graphic and scaling

Hi,

I do not really understand the scaling of external images. I have an Area of
220mm (height) and 170mm (width) where I can include graphics. Thus I write
something like:

<fo:external-graphic content-height="220mm" content-width="170mm"
src="{@graphic}.png"/>

Isn't it (theoretically) right that if I specify content-height and
content-width the image should be scaled and thus could be distorted. But if
I include a graphic which has landscape orientation FOP scales it to 170mm
width but doesn't scale the height to 220mm. The height is correct relativ
to the width. This is perfect for me but doesn't this conflict with theory?

BTW: If I specify something like this:

<fo:external-graphic content-height="220mm" src="{@graphic}.png"/>

FOP scales the height of landscape graphics to 220mm and the width is out of
the boundaries of the document.

Kai


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


RE: Again: external-graphic and scaling

Posted by Kai Mütz <km...@web.de>.
fop-users-return-23102-kmuetz=web.de@xmlgraphics.apache.org <> wrote:
> On Feb 8, 2007, at 19:45, Kai Mütz wrote:
>
> Hi,
>
>> <snip />
>> I do not really understand the scaling of external images. I have
>> an Area of
>> 220mm (height) and 170mm (width) where I can include graphics. Thus
>> I write something like:
>>
>> <fo:external-graphic content-height="220mm" content-width="170mm"
>> src="{@graphic}.png"/>
>>
>> Isn't it (theoretically) right that if I specify content-height and
>> content-width the image should be scaled and thus could be distorted.
>
> Only if you would specify scaling="non-uniform".
> If not, then FOP defaults to preserving the aspect ratio, as is
> mandated by the Recommendation.
>
> See: http://www.w3.org/TR/xsl/#scaling
>
>> But if
>> I include a graphic which has landscape orientation FOP scales it
>> to 170mm
>> width but doesn't scale the height to 220mm. The height is correct
>> relativ to the width. This is perfect for me but doesn't this
>> conflict with theory?
>
> Nope. :)
>
> HTH!
>

It does. Thank you.

Kai


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


Re: Again: external-graphic and scaling

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Feb 8, 2007, at 19:45, Kai Mütz wrote:

Hi,

> <snip />
> I do not really understand the scaling of external images. I have  
> an Area of
> 220mm (height) and 170mm (width) where I can include graphics. Thus  
> I write
> something like:
>
> <fo:external-graphic content-height="220mm" content-width="170mm"
> src="{@graphic}.png"/>
>
> Isn't it (theoretically) right that if I specify content-height and
> content-width the image should be scaled and thus could be distorted.

Only if you would specify scaling="non-uniform".
If not, then FOP defaults to preserving the aspect ratio, as is  
mandated by the Recommendation.

See: http://www.w3.org/TR/xsl/#scaling

> But if
> I include a graphic which has landscape orientation FOP scales it  
> to 170mm
> width but doesn't scale the height to 220mm. The height is correct  
> relativ
> to the width. This is perfect for me but doesn't this conflict with  
> theory?

Nope. :)

HTH!

Cheers,

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