home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Corel Draw 6
/
corel-draw-6-cd1.iso
/
draw
/
stripes.csc
< prev
next >
Wrap
Text File
|
1995-08-18
|
1KB
|
39 lines
REM Fills objects with stripes in Draw
REM Stripes.csc, July 28, 1995
REM Improved! Fills conical or linear depending on type of object
WITHOBJECT DRAW
REM see if any object selected
ON ERROR GOTO HANDLER ' setup error handler
ObjType& = .GetObjectType()
ON ERROR EXIT ' restore no error handling
IF ObjType = 1 OR Objtype = 4 OR ObjType = 12 THEN ' rectangle, text OR group
.ApplyFountainFill 0, 0, 0, 0, 200, 0, 3, 50 ' linear
ELSEIF ObjType = 2 OR ObjType = 9 THEN ' ellipse or sum polygon
.ApplyFountainFill 2, 0, 0, 0, 200, 0, 3, 50 ' conical
ELSE
MESSAGE "Cannot fill objects of selected type."
STOP
ENDIF
FOR i = 5 TO 95 STEP 10
.SetFountainFillcolor i, 5, 255, 0, 51, 0
NEXT i
FOR i = 0 TO 100 STEP 10
.SetFountainFillcolor i, 5, 255, 255, 255, 0
NEXT i
STOP ' END of main program
HANDLER : ' handles runtime errors
IF ERRNUM = 5010 THEN
MESSAGE "You need something selected"
ELSE
MESSAGE "Unhandled Error " + STR(ERRNUM)
END IF
END WITHOBJECT