On Thursday 04 April 2002 1:24 pm, Herbert Voss wrote:
> Lars Gullik Bjønnes wrote:
> > | Sorry, you've lost me. What good would that be? Perhaps some sample
> > | code? I learn best through examples.
> >
> > First you decide what the form om a valid bb string is:
>
> but graphicx also accepts bb=1cm 1cm 1cm 1cm;
>
> why not doing it in the same way than in ControlGraphics
>
>          std::ifstream is(bb.c_str());
>          string a, b, c, d;
>          is >> a >> b >> c >> d;
>          if (!isValidLength(a) || !isValidLength(b) ||
>              !isValidLength(c) || !isValidLength(d))
>                  return;
>          LyXLength const length_xl(a);
>          LyXLength const length_yb(b);
>          LyXLength const length_xr(c);
>          LyXLength const length_yt(d);

Very neat. I'll apply it once I've tested it works.
Angus

Reply via email to