// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.Fonts.Rendering {
///
/// Defines a color stop for gradient paints.
/// Offsets must be clamped to the range [0, 1] by the interpreter.
/// Colors are direct RGBA and must not reference palettes.
///
public readonly struct GradientStop
{
///
/// Initializes a new instance of the struct.
///
/// The stop position in the range [0, 1].
/// The color at the stop.
public GradientStop(float offset, GlyphColor color)
{
this.Offset = offset;
this.Color = color;
}
///
/// Gets the stop position in the range [0, 1].
///
public float Offset { get; }
///
/// Gets the color at the stop (direct RGBA).
///
public GlyphColor Color { get; }
}
}