getrenderproperty

Gets a property value from a drawing object.

Syntax

getrenderproperty(drawing: Drawing, property: string) -> any

Parameters

ParameterTypeDescription
drawingDrawingThe drawing object
propertystringThe property name

Returns

TypeDescription
anyThe value of the property

Description

getrenderproperty retrieves the current value of a property on a drawing object. This is an alternative to directly accessing properties.

Example

local circle = Drawing.new("Circle")
circle.Position = Vector2.new(500, 500)
circle.Radius = 100
circle.Color = Color3.fromRGB(255, 0, 0)
circle.Visible = true

-- Get properties using getrenderproperty
local pos = getrenderproperty(circle, "Position")
local radius = getrenderproperty(circle, "Radius")
local color = getrenderproperty(circle, "Color")

print(pos)    -- 500, 500
print(radius) -- 100
print(color)  -- 1, 0, 0