AddPoint

Syntax:

AddPoint(Index , Position)

AddPoint(Index ,PosX, PosY)

Parameters:

Position – An object with "x" and "y" members containing the position of the point to add. This parameter is required.

This type of object is returned by many script functions, such as GetPosition() and GetMousePosition().

or

PosX – X coordinate of the new point. This parameter is required.

PosY – Y coordinate of the new point. This parameter is required.

Index – Index of the existing point to add the new point after. To add a point at the end of the current line, pass -1 as the index. This index is zero based (i.e. the first point is point 0). This parameter is optional and the default is -1.

All positions are in untransformed page coordinates. To avoid making your calculations too complex we strongly advise using untransformed (i.e. not rotated or scaled) frames when using the drawing functions.

Remarks:

This function allows additional points to be added or inserted into a line or shape drawn using the script drawing commands.

Note:
This command cannot be used to modify polygons drawn using the editor drawing tools.

Note:
All lines and shapes added to any individual frame are created as part of a single contour (this is a single continuous line). Adding intersecting shapes will produce gaps in the shape. To draw multiple independent shapes, use multiple frame objects.

image\Script_Button.jpgExamples