REM Created in CorelPhotoPaint Version 9.397 REM Created On Monday, December, 13, 1999 by linkaxdx REM Cut_outb.csc REM This version uses the nearest multiple of 45 degrees and REM simple mask shifts for the catch-light edge mask. ' Run the script with a mask active and the mask channel empty and no objects. WITHOBJECT "CorelPhotoPaint.Automation.9" w& = .GetDocumentWidth() h& = .GetDocumentHeight() ' ************** Edit Controls Here ****************** wb& = 10 ' pixel width of motion blur (default 10) dg = 315 ' angle of shadow (popular default 315) ' ***************end of edit controls **************** sa = ANGLECONVERT(1,2,dg) ' shadow angle in radians x& = wb&/2*cos(sa) ' x and y shift values for motion center y& = -wb&/2*sin(sa) deg% = dg SELECT CASE deg% ' find the closest edge shift for the angle CASE 0 TO 22 xe& = 1 ye& = 0 CASE 23 TO 67 xe& = 1 ye& = -1 CASE 68 TO 112 xe& = 0 ye& = -1 CASE 113 TO 157 xe& = -1 ye& = -1 CASE 158 TO 202 xe& = -1 ye& = 0 CASE 203 TO 247 xe& = -1 ye& = 1 CASE 248 TO 292 xe& = 0 ye& = 1 CASE 293 TO 337 xe& = 1 ye& = 1 CASE 338 TO 360 xe& = 1 ye& = 0 CASE ELSE MESSAGE "Incorrect angle specified" MESSAGE "Try again please" STOP END SELECT .MaskChannelAdd "shape" .MaskTranslate xe&, ye& .MaskChannelToMask 0, 2 .MaskChannelAdd "edge" .MaskRemove .MaskChannelToMask 0, 0 .MaskTranslate x&,y& .EditFill 0, 0, 100, 0, 0, 0, h-1, 0, h-1, 0, h-1 .FillSolid 5, 0, 0, 0, 0 .EndEditFill .MaskRemove .EffectMotionBlur wb&, dg, 0 .EffectGaussianBlur 1 .ImageInvert .EndColorEffect .MaskChannelToMask 0, 0 .ObjectCreate TRUE .EndObject .EditCopy .ObjectMerge TRUE .EndObject .EditClear 5, 255, 255, 255, 0 Message \\ "IMPORT image or FILL background" & CHR(13) & \\ "MASK/LOAD/shape, prep recessed area, remove mask" & CHR(13) & \\ "CTRL-V, Mult. Merge, Combine layers" & CHR(13) & \\ "MASK/LOAD/edge, paint on edge lights, remove mask." END WITHOBJECT