getrenderproperty
Gets a property value from a drawing object.
Syntax
getrenderproperty(drawing: Drawing, property: string) -> anyParameters
| Parameter | Type | Description |
|---|---|---|
drawing | Drawing | The drawing object |
property | string | The property name |
Returns
| Type | Description |
|---|---|
any | The 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, 0Related Functions
Drawing- View drawing types and their propertiessetrenderproperty- Set a propertyisrenderobj- Check if value is a drawing