// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using System.Diagnostics; using SixLabors.ImageSharp.PixelFormats; namespace SixLabors.ImageSharp.Processing { /// /// A struct that defines a single color stop. /// [DebuggerDisplay("ColorStop({Ratio} -> {Color}")] public readonly struct ColorStop { /// /// Initializes a new instance of the struct. /// /// Where should it be? 0 is at the start, 1 at the end of the Gradient. /// What color should be used at that point? public ColorStop(float ratio, in Color color) { this.Ratio = ratio; this.Color = color; } /// /// Gets the point along the defined gradient axis. /// public float Ratio { get; } /// /// Gets the color to be used. /// public Color Color { get; } } }