From: | Nick Clover |
Date: | 2 Jul 2001 at 14:47:58 |
Subject: | Rastered backgrounds |
Greetings,
I'm trying to add a shadow to a window, I've been using the following routine
to draw it:
Statement BFWindow{WindoID.w,WLeft,WTop,WWidth,WHeight,pen}
*Windo.Window = Peek.l(Addr Window(WindoID.w))
USEPATH *Windo
\RPort\AreaPtrn = ?BackFill ;Pattern Address
\RPort\AreaPtSz = 1 ;use 2 arrays form the
;Pattern Address
If \Flags AND $400
WLeft - WLeftOff
WTop - WTopOff
EndIf
;Put a BackFill in the Window.
SetAPen_ \RPort,pen
SetDrMd_ \RPort,1
BltPattern_ \RPort,0,WLeft,WTop,WWidth,WHeight,0
\RPort\AreaPtrn = 0 ;Put it back to 0
\RPort\AreaPtSz = 0 ;Put it back to 0
Statement Return
BackFill:
Dc.w %0101010101010101 ; first line...
Dc.w %1010101010101010 ; next line...
; ;%---------------- ...and repeats all down the window...
; These 0's and 1's control the pattern -
; edit them to change the pattern, but :
; BEWARE : Using the wrong number of 0's and 1's WILL
; crash the machine!!!!!
; Use the -'s as a guide :)
End Statement
Is there anyway I can get it to draw just the '1's and not the '0's as
I want the background of the window to show through to give a proper shadow
effect.
The window background is a BltBitMapRastPort from the workbench screen.
What I would really like to do is a shadow similar to magicmenu's but I haven't
got a clue how to do that.
Cheers
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie