On Monday 08 April 2002 9:07 pm, Herbert Voss wrote: > Angus Leeming wrote: > > modify the bounding box of your graphic file from say: > > %%BoundingBox: 0 0 200 180 > > to > > %%BoundingBox: 30 30 200 180 > > > > (Big enough to see the effect anyway...) > > > > Display the file. Fine. Clip it fine. (Not changed the bounds, so it > > isn't clipped). > > > > Change xl to 31 in the graphics dialog (change by 1). Now clip it... > > > > Lose 30 from the top and the right :-( > > > > What's the solution to this then? > > what does the unit of the bb says?? always bp? > > Herbert
Yes. I think that the problem is quite subtle. rose.eps had a bounding box of (xl yb xr yt), but had no pixels outside this range, so the width of the loaded image was (xr-xl) and it's height was (yt-yb). If I modify the bounding box by hand, the image width, height of the original, unclipped image is unchanged by my modification and is greater than (xr-xl), (yt-yb). If I now clip, I take those 30 pixels of the top right, so: int const xoffset_r = image_->w - params.bb.xr); int const yoffset_t = image_->h - params.bb.yt); rather than off the bottom left. I'm not sure what the solution to this is. Angus