[comp.windows.news] Moving child canvases

mwp@cs.mu.oz.au (Michael Paddon) (05/22/89)

I have an application which basically consists of a window (canvas)
with lots of objects (child canvases) in it. I want to scroll around
the object space represented by the window.

Unfortunately, it seems that NeWS won't let a child canvas extend
beyond the top and left edges of its parent.

Two questions...
	(i) Why is it so?
	(ii) How do I get around it?

-------------------------------------------------------------
|                  | email: mwp@munnari.oz.au               |
|                  | voice: (03) 344 4246                   |
|  Michael Paddon  | snail: Department of Computer Science, |
|                  |        The University of Melbourne,    |
|                  |        Parkville 3052, Australia       |
-------------------------------------------------------------

gnu@hoptoad.uucp (John Gilmore) (05/26/89)

NeWS 1.1 won't let child canvases be left or top of their parent
because of limitations in "pixrects".  These limitations have
reportedly been removed in X/NeWS.  (It bugged me too.)
-- 
John Gilmore    {sun,pacbell,uunet,pyramid,amdahl}!hoptoad!gnu    gnu@toad.com
  A well-regulated militia, being necessary to the security of a free State,
  the right of the people to keep and bear arms, shall not be infringed.

ads@cs.qmc.ac.uk (Adam Billyard) (05/26/89)

In article <1523@murtoa.cs.mu.oz.au> mwp@cs.mu.oz.au (Michael Paddon) writes:
>I have an application which basically consists of a window (canvas)
>with lots of objects (child canvases) in it. I want to scroll around
>the object space represented by the window.
>
>Unfortunately, it seems that NeWS won't let a child canvas extend
>beyond the top and left edges of its parent.
>
>Two questions...
>       (i) Why is it so?
>       (ii) How do I get around it?

This is an old documented bug of the underlying Pixrect library
that NeWS ultimately uses for rendering. There is no way around
this problem short of some pretty hairy reshaping for canvases
on the left and top edges. My solution was to drop the use of
child canvases and build some path classes to allow me to have
hierarchies of paths - these obviously aren't affected by this
bug.

        Adam.

-- 

JANET:  ads@cs.qmc.ac.uk
ARPA:   ads%cs.qmc.ac.uk@nss.cs.ucl.ac.uk
BITNET: ads%uk.ac.qmc.cs@ukacrl.bitnet