Subject: You must make evenly sized gaps in fillAlong and fillDown

It is not always possible to insert equal-sized gaps between panes due
to the fact that pixel dimensions are integer quantities.  However, you
must ensure that all gaps are as close in size as possible; i.e. if the
smallest gap is, say, three pixels, then the largest gap must be no more
than four pixels.

You will get into trouble if you try and calculate a single gap size to
go in between each pane.  E.g. you might calculate something like

	gap = "total size that needs to be filled" div "number of gaps"

For a start, the product (gap * number of gaps) is likely to be less
than than "total size that needs to be filled".  This is bad, because it
means the pane will fall short of its required size.

A quick fix to slop all the remaining space into the last gap can cause
some nasty bumps.  Consider a fillAlong of 5 panes that need 11 spaces
of padding.  The calculation for gap above will assign 11 div 4 = *two*
spaces to be placed between each of the first four panes.  This leaves
*five* spaces to be dumped between the fourth and the last panes!  The
effect will look something like this:

	1  2  3  4     5


What we want is an effect like this:

	1  2   3   4   5

The gaps in this case are 2, 3, 3 and 3.  Of course, this is much less
of a problem with the Xwindows display, since pixel are larger numbers
and small enough that only picky lecturers are likely to notice.

One way to go about this sort of thing is to say that the first gap is 2
(calculated using the same formula), but that the remaining four panes
need a total gap of 11 - 2 = 9.  This will work out at exactly 3 spaces
each, and gives the desired result.

-- 
-- John Hamer                                Email: J.Hamer@cs.auckland.ac.nz
-- Department of Computer Science            Phone: +64 9 3737 599 x8758
-- University of Auckland                    Fax:   +64 9 3737 453
-- Private Bag 92019, Auckland, New Zealand.