setVertexColour()
Purpose
Sets the vertex colour of a shape drawn with drawShape()
Description
Used to adjust the tint (colour) of a supplied vertex in a shape. Creates a gradient toward other vertex colours
Syntax
setVertexColour( shape, vertex, colour )
Arguments
shape Handle of the shape in question
vertex Number of the desired vertex (0 - N)
colour Vector (RGBA) colour of the desired vertex
Example
// draw a multicoloured rectangle on the screen
box1 = createBox( gwidth() / 2, gheight() / 2, gwidth(), gheight() )
setVertexColour( box1, 0, bisque )
setVertexColour( box1, 1, cyan )
setVertexColour( box1, 2, fuzeblue )
setVertexColour( box1, 3, fuzepink )
drawShape( box1 )
update()
sleep( 3 )
Associated Commands
createLine(), createLineStrip(), createCurve(), createCircle(), createTriangle(), createPoly(), createStar(), createBox(), copyShape(), deleteShape(), drawShape(), joinShapes(), moveShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), setShapeRotation(), rotateShape(), getShapeScale(), setShapeScale(), scaleShape(), getShapeTint(), setShapeTint(), numVerts(), getVertex(), setVertex(), getVertexColour(), getVertexLineThickness(), setVertexLineStyle(), setShapeColour(), setShapeLineStyle(), setShapeScaleModeLocal()