home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Corel Draw 6
/
corel-draw-6-cd1.iso
/
draw
/
shadow.csc
< prev
next >
Wrap
Text File
|
1995-08-18
|
2KB
|
50 lines
REM This script applies a drop shadow
REM Shadow.csc July 21, 1995
REM Brings up a dialog box which allows you to specify settings for a simple shadow.
BEGIN DIALOG Dialog1 312, 134, "Drop Shadow Dialog"
OKBUTTON 241, 14, 54, 16
CANCELBUTTON 241, 38, 54, 16
GROUPBOX 21, 11, 80, 49, "Up / Down"
OPTIONGROUP UpDown%
OPTIONBUTTON 28, 24, 58, 10, "Apply Up"
OPTIONBUTTON 28, 45, 58, 10, "Apply Down"
GROUPBOX 22, 65, 80, 55, "Left / Right"
OPTIONGROUP LeftRight%
OPTIONBUTTON 30, 79, 58, 10, "Apply Right"
OPTIONBUTTON 30, 98, 58, 10, "Apply Left"
TEXT 108, 16, 70, 8, "Amount (1/32 inch)"
SPINCONTROL 175, 16, 45, 15, VertVal%
TEXT 108, 70, 70, 8, "Amount (1/32 inch)"
SPINCONTROL 175, 70, 45, 15, HorizVal%
TEXT 235, 70, 70, 8, "% Black"
SPINCONTROL 265, 70, 45, 15, Black%
END DIALOG
UpDown = 1
LeftRight = 1
HorizVal = 3
VertVal = 3
Black% = 30
ret = DIALOG(dialog1)
IF CANCEL THEN STOP
REM Flip values TO negative if Left OR Down chosen
IF LeftRight = 1 THEN HorizVal = -HorizVal 'If left
IF UpDown = 1 THEN VertVal = -VertVal 'If down
REM Calculate the change in position FOR the shadow.
DeltaH& = FROMINCHES(HorizVal / 32.0)
DeltaV& = FROMINCHES(VertVal / 32.0)
WITHOBJECT DRAW
.CopyToClipboard
.PasteFromClipboard
.ApplyUniformFillColor 9, 255*(1 - Black/100.0), 0, 0, 0
.SetReferencePoint 1
.GetPosition Xpos&, Ypos&
.SetPosition Xpos + DeltaH, Ypos + DeltaV
.ApplyOutline 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.OrderToBack
END WITHOBJECT