// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Framework.Graphics.Effects { /// /// This class holds extension methods for effects. /// public static class EffectExtensions { /// /// Applies the given effect to the given drawable and optionally initializes the created drawable with the given initializationAction. /// /// The type of the drawable that results from applying the given effect. /// The effect to apply to the drawable. /// The drawable to apply the effect to. /// The action that should get called to initialize the created drawable before it is returned. /// The drawable created by applying the given effect to this drawable. public static T ApplyTo(this IEffect effect, Drawable drawable, Action initializationAction = null) where T : Drawable => drawable.WithEffect(effect, initializationAction); } }