REM Created in CorelPhotoPaint Version 9.439 REM From a sample script by Alex Vakulenko REM Modified by Alex Link ' Aspinxor.csc - mask spinner script with xor mask ' The script requires ONE mask with it's center in the right half of the screen. ' Screen center is the center of rotation. Use ruler and guidelines for ' precision mask placement. ' The mask channel should be empty. withobject "CorelPhotoPaint.Automation.9" csw& = .GetDocumentWidth() csh& = .GetDocumentHeight() cx& = csw&/2 ' screen center and center of rotation cy& = csh&/2 Msg$ = "Enter the number of masks desired: " & CHR(13) & \\ "Even dividers of 360 work best for large numbers," & CHR(13) & \\ "for example 90 plots fine, 50 does not." uix$ = INPUTBOX(Msg$) ix& = VAL(uix$) IF ix = 0 then ix = 12 rx& = 360/ix ' angle of rotation .MaskChannelAdd "m1" for i&=1 to ix-1 .GetMaskRectangle l&, t&, r&, b& r&=r&+1 b&=b&+1 cxo&=(l+r)/2 ' Center of mask cyo&=(t+b)/2 a#=ANGLECONVERT(1,2,rx*i) ' Rotation angle D11#=COS(a) D12#=SIN(a) D21#=-SIN(a) D22#=COS(a) dx1&=cxo-cx ' Center of mask relative to the center of rotation dy1&=cyo-cy dx2&=D11*dx1+D12*dy1+cx ' Required position of the new center of the transformed mask dy2&=D21*dx1+D22*dy1+cy .MaskAffineDistort 0, 0, D11, D12, D21, D22, TRUE .GetMaskRectangle l&, t&, r&, b& ' Coordinates of transformed mask r&=r&+1 b&=b&+1 cx1&=(l+r)/2 ' Center of new transformed mask cy1&=(t+b)/2 .MaskTranslate dx2-cx1, dy2-cy1 .MaskChannelAdd "m" & STR(i+1) .MaskChannelToMask 0, 0 next i ' ............................................ for j = 1 to ix-1 .MaskChannelToMask j, 3 next j .MaskChannelAdd "xormask" end withobject