Syntax
setrenderproperty(object: any, property: any, value: any)Arguments
| Name | Type | Description |
|---|---|---|
object | any | Value to index and assign into. With a Drawing object, the RealDrawingObject __newindex handler is used. |
property | any | Property key used for assignment. Drawing object properties are string-based. |
value | any | Value assigned to object[property]. The argument must be supplied; nil is still a supplied value. |
Description
Assigns value to object[property]. For Drawing object, this uses the same Drawing property assignment as direct property assignment. Unknown Drawing properties are ignored, and destroyed Drawing objects are not changed. The third argument must be present. the Drawing API registers this API only when the required rendering environment is active is true; when that check is false, the initializer returns before creating these globals.
Call it with 3 parameter(s): object, property, value. The argument table explains which values are required and which ones only refine the behavior.
It does not return data. Treat the call as an action and handle errors around the call site when needed.
Example
Assign a Drawing property like direct property assignment.
local line = Drawing.new("Line")
setrenderproperty(line, "Thickness", 3)
setrenderproperty(line, "Visible", true)
print(line.Thickness)
print(line.Visible)