|
|
|
@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Processing.Overlays |
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
{ |
|
|
|
return Glow(source, color, GraphicsOptions.Default); |
|
|
|
return Glow(source, GraphicsOptions.Default, color); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -45,7 +45,7 @@ namespace SixLabors.ImageSharp.Processing.Overlays |
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, float radius) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> Glow(source, radius, GraphicsOptions.Default); |
|
|
|
=> Glow(source, GraphicsOptions.Default, radius); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Processing.Overlays |
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, Rectangle rectangle) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(rectangle, GraphicsOptions.Default); |
|
|
|
=> source.Glow(GraphicsOptions.Default, rectangle); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
@ -73,7 +73,7 @@ namespace SixLabors.ImageSharp.Processing.Overlays |
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, float radius, Rectangle rectangle) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(color, ValueSize.Absolute(radius), rectangle, GraphicsOptions.Default); |
|
|
|
=> source.Glow(GraphicsOptions.Default, color, ValueSize.Absolute(radius), rectangle); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
@ -84,75 +84,75 @@ namespace SixLabors.ImageSharp.Processing.Overlays |
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(0.5f), options); |
|
|
|
=> source.Glow(options, NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(0.5f)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="color">The color to set as the glow.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <param name="color">The color to set as the glow.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, GraphicsOptions options) |
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(color, ValueSize.PercentageOfWidth(0.5f), options); |
|
|
|
=> source.Glow(options, color, ValueSize.PercentageOfWidth(0.5f)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="radius">The the radius.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <param name="radius">The the radius.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, float radius, GraphicsOptions options) |
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, float radius) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(NamedColors<TPixel>.Black, ValueSize.Absolute(radius), options); |
|
|
|
=> source.Glow(options, NamedColors<TPixel>.Black, ValueSize.Absolute(radius)); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <param name="rectangle">
|
|
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
|
|
|
|
/// </param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, Rectangle rectangle, GraphicsOptions options) |
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, Rectangle rectangle) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(0.5f), rectangle, options); |
|
|
|
=> source.Glow(options, NamedColors<TPixel>.Black, ValueSize.PercentageOfWidth(0.5f), rectangle); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <param name="color">The color to set as the glow.</param>
|
|
|
|
/// <param name="radius">The the radius.</param>
|
|
|
|
/// <param name="rectangle">
|
|
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
|
|
|
|
/// </param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, float radius, Rectangle rectangle, GraphicsOptions options) |
|
|
|
public static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, float radius, Rectangle rectangle) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.Glow(color, ValueSize.Absolute(radius), rectangle, options); |
|
|
|
=> source.Glow(options, color, ValueSize.Absolute(radius), rectangle); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Applies a radial glow effect to an image.
|
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <param name="color">The color to set as the glow.</param>
|
|
|
|
/// <param name="radius">The the radius.</param>
|
|
|
|
/// <param name="rectangle">
|
|
|
|
/// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
|
|
|
|
/// </param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
private static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, ValueSize radius, Rectangle rectangle, GraphicsOptions options) |
|
|
|
private static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, ValueSize radius, Rectangle rectangle) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.ApplyProcessor(new GlowProcessor<TPixel>(color, radius, options), rectangle); |
|
|
|
|
|
|
|
@ -161,12 +161,12 @@ namespace SixLabors.ImageSharp.Processing.Overlays |
|
|
|
/// </summary>
|
|
|
|
/// <typeparam name="TPixel">The pixel format.</typeparam>
|
|
|
|
/// <param name="source">The image this method extends.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <param name="color">The color to set as the glow.</param>
|
|
|
|
/// <param name="radius">The the radius.</param>
|
|
|
|
/// <param name="options">The options effecting things like blending.</param>
|
|
|
|
/// <returns>The <see cref="Image{TPixel}"/>.</returns>
|
|
|
|
private static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, TPixel color, ValueSize radius, GraphicsOptions options) |
|
|
|
private static IImageProcessingContext<TPixel> Glow<TPixel>(this IImageProcessingContext<TPixel> source, GraphicsOptions options, TPixel color, ValueSize radius) |
|
|
|
where TPixel : struct, IPixel<TPixel> |
|
|
|
=> source.ApplyProcessor(new GlowProcessor<TPixel>(color, radius, options)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |