This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Ah, then you need to add one more attribute:

width="100%"
scalefit="1"
contentwidth="100%"

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.
>
> > If you are using FOP, then I don't know of any combination of
> > attributes that will scale to fit. The current version of FOP does not
> > support the content-width property, which is where the scale-to-fit
> > value would go.
>
> Even if FOP does not support that yet, does DocBook FO stylesheets
> produce content-width properties?
>
> -- 
> Sam Steingold (http://www.podval.org/~sds) running w2k
> <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
> <http://www.mideasttruth.com/> <http://www.honestreporting.com>
> Ph.D. stands for "Phony Doctor"  - Isaak Asimov, Ph.D.
>
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]