Draw gradients
You can see some functions used for gradients
AAS.SimpleLinearGradient(x, y, w, h, startColor, endColor)
A simple linear gradient with just two offsets
Types
Arguments
Descriptions
Optional
Example :
hook.Add("HUDPaint", "AAS:Documentation:SimpleLinearGradient", function()
AAS.SimpleLinearGradient(300, 200, 50, 100, Color(255, 255, 255), Color(0, 0, 0))
end)
AAS.LinearGradient(x, y, w, h, offsets)
A linear gradient with custom offsets
Offset table structure :
Example :
local offsets = {
{offset = 0, color = Color(255, 255, 255)},
{offset = 0.4, color = Color(255, 0, 255)},
{offset = 1, color = Color(0, 0, 0)}
}
hook.Add("HUDPaint", "AAS:Documentation:LinearGradient", function()
AAS.LinearGradient(800, 500, 75, 300, offsets)
end)
Last updated
Was this helpful?