Drawablebase
Classes
Class: Drawablebase
A
Drawablebaseis the most basic type of drawable. It supports visibility, color, rotation, and sRGB settings. Many other drawables likeDrawableDDSandColorDrawableinherit from this base class.
Method: IsVisible
(method) Drawablebase:IsVisible()
-> visible: boolean
Returns a boolean indicating if the Drawablebase is visible.
@return
visible—trueif the Drawablebase is visible,falseotherwise.
Method: SetVisible
(method) Drawablebase:SetVisible(visible: boolean)
Shows or hides the Drawablebase.
@param
visible—trueto show,falseto hide. (default:true)
Method: SetVisibleForString
(method) Drawablebase:SetVisibleForString(minValue: string, maxValue: string, value: string)
Sets the visibility condition based on a string value range.
@param
minValue— The minimum value for visibility.@param
maxValue— The maximum value for visibility.@param
value— The value to check (value > minValue and value < maxValue).
Method: SetSRGB
(method) Drawablebase:SetSRGB(srgb: boolean)
Enables or disables sRGB for the Drawablebase.
@param
srgb—trueto enable sRGB,falseto disable.
Method: SetColor
(method) Drawablebase:SetColor(r: number, g: number, b: number, a: number)
Sets the color for the Drawablebase.
@param
r— The red color component (min:0, max:1).@param
g— The green color component (min:0, max:1).@param
b— The blue color component (min:0, max:1).@param
a— The alpha (opacity) component (min:0, max:1).
Method: SetRotation
(method) Drawablebase:SetRotation(angle: number)
Sets the rotation angle of the Drawablebase. Works on
ImageDrawableandIconDrawable.@param
angle— The rotation angle in degrees.
Method: Show
(method) Drawablebase:Show(show: boolean)
Shows or hides the Drawablebase. Showing before the all extents and anchors are set can cause issues.
@param
show—trueto show,falseto hide. (default:true)