// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Containers; using osuTK; namespace osu.Framework.Graphics.Effects { /// /// Parametrizes the appearance of an edge effect. /// public struct EdgeEffectParameters : IEquatable { /// /// Colour of the edge effect. /// public SRGBColour Colour; /// /// Positional offset applied to the edge effect. /// Useful for off-center shadows. /// public Vector2 Offset; /// /// The type of the edge effect. /// public EdgeEffectType Type; /// /// How round the edge effect should appear. Adds to the /// of the corresponding . Not to confuse with the . /// public float Roundness; /// /// How "thick" the edge effect is around the . In other words: At what distance /// from the 's border the edge effect becomes fully invisible. /// public float Radius; /// /// Whether the inside of the EdgeEffect rectangle should be empty. /// public bool Hollow; public readonly bool Equals(EdgeEffectParameters other) => Colour.Equals(other.Colour) && Offset == other.Offset && Type == other.Type && Roundness == other.Roundness && Radius == other.Radius; public override readonly string ToString() => Type != EdgeEffectType.None ? $@"{Radius} {Type}EdgeEffect" : @"EdgeEffect (Disabled)"; } }