/*
This is an example script for a 2D path graphic. Click the Execute button to apply and then execute this script.
*/

/* Declarations */

@@class() Path:Object

@@method(public, class) (id)stored;
@@method(public, instance) (void)emptyData;
@@method(public, instance) (unsigned)animationCount;
@@method(public, instance) (void)moveToXValue:(double)xValue yValue:(double)yValue;
@@method(public, instance) (void)lineToXValue:(double)xValue yValue:(double)yValue;
@@method(public, instance) (void)closePath;

@@end

/* Execution block */

{
id myPath;

myPath = [Path stored];

/*
Empty the path and then append new path operations. The path represents an octagon.
*/

[myPath emptyData];

[myPath moveToXValue:30.0 yValue:0.0];
[myPath lineToXValue:70.0 yValue:0.0];
[myPath lineToXValue:100.0 yValue:30.0];
[myPath lineToXValue:100.0 yValue:70.0];
[myPath lineToXValue:70.0 yValue:100.0];
[myPath lineToXValue:30.0 yValue:100.0];
[myPath lineToXValue:0.0 yValue:70.0];
[myPath lineToXValue:0.0 yValue:30.0];
[myPath lineToXValue:30.0 yValue:0.0];
[myPath closePath];

}
