[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to crop oversized objects?
From: |
Mark Summerfield |
Subject: |
Re: How to crop oversized objects? |
Date: |
Sat, 24 Mar 2007 07:33:57 +0000 |
User-agent: |
KMail/1.9.6 |
On Fri 23-Mar-07, Jeff Kingston wrote:
> > is there a possibility to crop an object that is too wide
> > to fit into a table-cell, instead of omitting it?
>
> I don't think this has ever been done, although it would
> be easy enough using a @Graphic symbol that invokes the
> PostScript clip operator.
>
> I grepped the Lout modules for uses of the PostScript clip operator,
> and found a few. None of them are used in a suitably general way
> for a general feature though. One of them is the basis for my
> wonderful system of drawing node boundaries inside the geometrical
> shape, instead of centred over the shape - I clip to the boundary
> and then draw along the boundary, which is clever.
>
> I'd be interested in cooperating with the list in the design
> of a clip operator for Lout. Here are my initial thoughts:
>
> * Are we designing an operator that swings into action automatically
> when things are too large, clipping instead of scaling or dropping?
I don't think anything should ever be dropped by lout. At worst lout
should either scale or put in
red @Color{DROPPED}
so that you can see what's happened even if you miss it in the mass of
error messages.
Personally I hate the idea of automatic clipping, even though automatic
scaling makes sense & is useful.
> Or are we just clipping to a particular width or height? The former
> would probably be more useful, since you could use it in the second
> way anyhow by means of
>
> 5i @Wide @Clip { ... }
To get full generality I'd suggest
@Clip width{}height{}leftoffset{}topoffset{}{Object}
with
5i @Wide 3c @High @Clip{}
also supported.
With scaling lout is not making a decision about _what_ to show, only
about making it small enough to show. With clipping, surely only the
user can decide what _part_ to show?
> * What about clipping to non-rectangular shapes? There is a problem
> here in that Lout's only means of specifying those is raw PostScript,
> but it can't infer the Lout size of an outline from the PostScript.
> So it might be better to keep away from this for now.
>
> * What about shifting and clipping e.g. suppose we want to see the
> central region of the object when we clip, not the leftmost part?
>
> A useful comparison would be with "downifneeded @Scale". This
> scales down so that the thing fits horizontally, but only if
> needed.
>
> Jeff
--
Mark Summerfield, Qtrac Ltd., www.qtrac.eu