The Alphas
property of the Gradient
struct provides access to an immutable list of alpha frames. These frames represent the transparency stops in the gradient and should be ordered by time to ensure correct gradient evaluation.
The Alphas
property of the Gradient
struct provides access to an immutable list of alpha frames. These frames represent the transparency stops in the gradient and should be ordered by time to ensure correct gradient evaluation.
Use the Alphas
property to retrieve the list of alpha frames that define the transparency levels at specific points in the gradient. This property is read-only and returns an ImmutableList
of AlphaFrame
objects.
To modify the alpha frames, you will need to create a new ImmutableList
with the desired changes and assign it to a new Gradient
instance.
// Example of accessing the Alphas property Gradient gradient = new Gradient(); ImmutableList<Gradient.AlphaFrame> alphaFrames = gradient.Alphas; // Iterate through the alpha frames foreach (var alphaFrame in alphaFrames) { float time = alphaFrame.Time; float alpha = alphaFrame.Alpha; // Use time and alpha as needed }