The first Vector object you draw on a page is automatically given the name Vector 1. This Vector object will contain the first line or shape you drew and it will be named Polygon. When referencing an object with the SetLineColour function you must identify the polygon name and not the vector object. In other words, in this example, to change the line colour of Vector 1, you must specify Polygon
Polygon.SetLineColour("green")
Note:
Like any other object in Opus, you can obviously change the name of the vector and polygon to any name you choose.
To change the line colour of a polygon named Polygon using a Hex value, use the following syntax:
Polygon.SetLineColour("#7F5D9A")
// a purplish colour
To change the line colour of a polygon named Polygon using the RGB function, use the following syntax:
Polygon.SetLineColour(RGB(200,98,33))
// or
var newColour = RGB(200,98,33)
Polygon.SetLineColour(newColour)
To change the line colour of a polygon named Polygon by the amount of red, green and blue, use the following syntax:
Polygon.SetLineColour(240,120,60)
// or
var red = 240
var green = 120
var blue = 60
Polygon.SetLineColour(red, green, blue)
To remove the line of a polygon named Polygon, use the following syntax:
Polygon.SetLineColour(-1)
To change the line colour of a polygon named Polygon and set the line’s transparency, use any of the syntaxes previously described, adding the opacity parameter. For example:
Polygon.SetLineColour( RGB(200,98,33), 10 )
Polygon.SetLineColour("#7F5D9A", 94)