Lingo Dictionary > T-Z > vertexList

 

vertexList

Syntax

member(whichVectorShapeMember).vertexList

Description

Cast member property; returns a linear list containing property lists, one for each vertex of a vector shape. The property list contains the location of the vertex and the control handle. There are no control handles if the location is (0,0).

Each vertex can have two control handles that determine the curve between this vertex and the adjacent vertexes. In vertexList, the coordinates of the control handles for a vertex are kept relative to that vertex, rather than absolute in the coordinate system of the shape. If the first control handle of a vertex is located 10 pixels to the left of that vertex, its location is stored as (-10, 0). Thus, when the location of a vertex is changed with Lingo, the control handles move with the vertex and do not need to be updated (unless the user specifically wants to change the location or size of the handle).

When modifying this property, be aware that you must reset the list contents after changing any of the values. This is because when you set a variable to the value of the property, you are placing a copy of the list, not the list itself, in the variable. To effect a change, use code like this:

- Get the current property contents
currVertList = member(1).vertexList
-- Add 25 pixels to the horizontal and vertical positions of the first vertex in the list
currVertList[1] .vertex = currVertList[1] .vertex + point(25, 25)
-- Reset the actual property to the newly computed position
member(1).vertexList = currVertList

Example

This statement displays the vertextList value for an arched line with two vertexes:

put member("Archie").vertexList
-- [[#vertex: point(-66.0000, 37.0000), #handle1: point(-70.0000, -36.0000),  \ #handle2: point(-62.0000, 110.0000)], [#vertex: point(66.0000, -5.0000),  \ #handle1: point(121.0000, 56.0000), #handle2: point(11.0000, -66.0000)]]

See also

addVertex, count(), deleteVertex(), moveVertex(), moveVertexHandle(), originMode, vertex