lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to crop oversized objects?


From: Jeff Kingston
Subject: Re: How to crop oversized objects?
Date: Sat, 24 Mar 2007 07:56:28 +1100

> 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?
  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 { ... }

* 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]