Skip to content

setrenderproperty

setrenderproperty assigns a value to a property of a Drawing object. This behaves identically to object[property] = value, but is useful for dynamic or abstracted property access.

function setrenderproperty(drawing: Drawing, property: string, value: any): ()

Parameters

Parameter Description
drawing A valid Drawing object.
property The name of the property to assign.
value The value to assign to the specified property.

Example

Setting drawing properties
1
2
3
4
5
6
7
local circle = Drawing.new("Circle")

setrenderproperty(circle, "Radius", 50)
setrenderproperty(circle, "Visible", true)

print(circle.Radius)   -- Output: 50
print(circle.Visible)  -- Output: true