SetLineColour()

Example 1: Identify the polygon to change

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.

Example 2: Change line colour by Hex value

To change the line colour of a polygon named Polygon using a Hex value, use the following syntax:

Polygon.SetLineColour("#7F5D9A")
// a purplish colour

Example 3: Change line colour by RGB function

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)

Example 4: Change line colour by specifying amount of Red, Green and Blue

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)

Example 5: Remove the line

To remove the line of a polygon named Polygon, use the following syntax:

Polygon.SetLineColour(-1)

Example 6: Setting the line transparency

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)

Close