// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Primitives; namespace SixLabors.ImageSharp.Processing.Processors.Overlays { /// /// Defines a radial glow effect applicable to an . /// public sealed class GlowProcessor : IImageProcessor { /// /// Initializes a new instance of the class. /// /// The color or the glow. public GlowProcessor(Color color) : this(color, 0) { } /// /// Initializes a new instance of the class. /// /// The color or the glow. /// The options effecting blending and composition. public GlowProcessor(Color color, GraphicsOptions options) : this(color, 0, options) { } /// /// Initializes a new instance of the class. /// /// The color or the glow. /// The radius of the glow. internal GlowProcessor(Color color, ValueSize radius) : this(color, radius, GraphicsOptions.Default) { } /// /// Initializes a new instance of the class. /// /// The color or the glow. /// The radius of the glow. /// The options effecting blending and composition. internal GlowProcessor(Color color, ValueSize radius, GraphicsOptions options) { this.GlowColor = color; this.Radius = radius; this.GraphicsOptions = options; } /// /// Gets the options effecting blending and composition /// public GraphicsOptions GraphicsOptions { get; } /// /// Gets the glow color to apply. /// public Color GlowColor { get; } /// /// Gets the the radius. /// internal ValueSize Radius { get; } /// public IImageProcessor CreatePixelSpecificProcessor() where TPixel : struct, IPixel { return new GlowProcessor(this); } } }