home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
compressed
/
graphic
/
vertex2.0demo.dms
/
vertex2.0demo.adf
/
Vertex
/
Rexxy
/
Round_Box.vert
< prev
next >
Wrap
Text File
|
1993-06-24
|
2KB
|
78 lines
/* Arexx */
/*
* This script will create a rounded box object. You are asked for
* the width, height and radius of the corners, and then the number
* of points to use for each rounded corner.
*/
options results /* Turn on results */
request 100 width 100 height 10 radius /* Get 3 values from the user*/
if result~="RESULT" then do
parse var result width height radius /* Parse the result */
getvalue Corner_Resolution 6 /* Get the point res */
parse var result points
data vtotal /* Store current point count */
parse var result start
start=start+1
minx = -width / 2 /* Set centered dimensions */
miny = -height / 2
hott /* Force the hot spot on */
x = minx + radius /* Computer center of radius */
y = miny + radius
shot x y 0 /* position the hot spot */
x = minx
y = miny + radius
vertex x y 0 /* Create the first point */
extrude 0 0 0 0 0 90 1 1 1 points /* Extrude first side and arc */
x = width - (radius*2)
extrude x 0 0 0 0 0 1 1 1 1
x = -minx - radius /* Extrude second arc */
y = miny + radius
shot x y 0
extrude 0 0 0 0 0 90 1 1 1 points
x = height - (radius*2)
extrude 0 x 0 0 0 0 1 1 1 1 /* Extrude second edge */
x = -minx - radius
y = -miny - radius
shot x y 0
extrude 0 0 0 0 0 90 1 1 1 points
x = -(width - (radius*2))
extrude x 0 0 0 0 0 1 1 1 1
x = minx + radius
y = -miny - radius
shot x y 0
extrude 0 0 0 0 0 90 1 1 1 points
x = -(height - (radius*2))
extrude 0 x 0 0 0 0 1 1 1 1
data vtotal
parse var result last
deselect all /* Fuse first and last points */
'select vert' start
'select vert' last
nott
fuse
'draw'
'endd'
end