OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Re: <graphic> scaling


> > I want the pictures to be take 100% when that requires 
> _shrinking_ of
> > the image, but not when that requires _stretching_ it.

You can't do that with XSL 1.0 as it is written (though 
I understand some implementations will do this given a
certain set of settings, so Bob's suggestion may work
in some cases with some implementations, but if it does,
it's just an "accident"). 

XSL 1.1 is adding some properties to allow specification of
the desired result.  See, for example, the scale-down-to-fit
value of the content-height property at
http://www.w3.org/TR/xsl11/#content-height

paul

> -----Original Message-----
> From: Bob Stayton [mailto:bobs@sagehill.net] 
> Sent: Wednesday, 24 November, 2004 13:00
> To: sds@gnu.org; docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Re: <graphic> scaling
> 
> Ah, then you need to add one more attribute:
> 
> width="100%"
> scalefit="1"
> contentdepth="100%"

[previous line altered per followup email--paul]

> 
> This sets the image height to its natural size, but it is further
> constrained by the other two attributes that set the viewport to the
> available width, and scale it down to fit it.
> 
> In XEP and Antenna House, this will keep the image at its natural size
> unless it is too big, in which case it will shrink it to fit. 
>  It doesn't
> work in FOP.
> 
> Yes, even though FOP doesn't support all the image 
> properties, the DocBook
> XSL stylesheets output the right properties.  So you may get 
> warnings about
> unsupported properties when using FOP.
> 
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
> 
> 
> ----- Original Message ----- 
> From: "Sam Steingold" <sds@gnu.org>
> To: <docbook-apps@lists.oasis-open.org>
> Sent: Wednesday, November 24, 2004 10:44 AM
> Subject: [docbook-apps] Re: <graphic> scaling
> 
> 
> > > * Bob Stayton <obof@fntruvyy.arg> [2004-11-24 01:48:36 -0800]:
> > >
> > > If you are not using FOP, then you can use these two attributes on
> > > your imagedata element to achieve what you want:
> > >
> > > width="100%"
> > > scalefit="1"
> > >
> > > These attributes mean the viewport for displaying the 
> graphic should
> > > be 100% of the available width, and the graphic should be 
> scaled to
> > > fit that viewport.
> >
> > Thanks, indeed, this is precisely _what I asked for_,
> > although not quite what I turned out to _want_. :-)
> >
> > I want the pictures to be take 100% when that requires 
> _shrinking_ of
> > the image, but not when that requires _stretching_ it.
> > E.g., when the image is huge, I want it shrunk to fit into 
> the viewport,
> > but when it is small, I want it to be displayed as is.
> >


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]