Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-unix!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!sun!cmcmanis From: cmcmanis@sun.UUCP Newsgroups: comp.sys.amiga Subject: Re: DropShadow Message-ID: <17734@sun.uucp> Date: Thu, 30-Apr-87 14:28:43 EDT Article-I.D.: sun.17734 Posted: Thu Apr 30 14:28:43 1987 Date-Received: Sat, 2-May-87 01:29:03 EDT References: <1555@solar.STANFORD.EDU> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 30 Summary: Thats a Jim Mackraz goody In article <1555@solar.STANFORD.EDU>, (Stuart Ferguson) writes: > While people are discussing Workbench enhancements/improvements, why not > include _DropShadow_* as part of the environment? Because it slows things down a bit? > By the way, does anyone know how that program works? Specifically: it > must add another bitplane to the Workbench screen but how does it do it? > Does it append the bitplane to the existing ones or does it allocate a > whole new screen and point the Workbench at it? > Stuart shf@solar.Stanford.EDU Jim Mackraz wrote it but kept the source secret. However he had published his dualpf program slightly earlier and the techniques seem to be similar. You can allocate another bitplane for the Workbench screen using AllocRaster and plugging the pointer into the bp->Planes[2] entry. Then set the 4 upper color registers to 'darker' versions of the workbench colors, diddle the screen pointers to make it believe it is a 3 bitplane screen, and voila whenever you draw a 1 bit in the new plane the user sees a shadow. Of course that is the easy part, now you have to SetFunction() the Layers library to let you know when the windows may have changed and update their shadows. And you have to calculate the 'altitude' of the various windows and figure out how to adjust the shadows etc. -- --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These views are my own and no one elses. They could be yours too, just call MrgCop() and then ReThinkDisplay()!