Example #1
0
 /// <summary>
 /// Applies a radial glow effect to an image.
 /// </summary>
 /// <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>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Glow(
     this IImageProcessingContext source,
     GraphicsOptions options,
     Color color,
     float radius,
     Rectangle rectangle) =>
 source.Glow(options, color, ValueSize.Absolute(radius), rectangle);
Example #2
0
 protected override void Apply(IImageProcessingContext ctx, Rectangle rect) => ctx.Glow(rect);
Example #3
0
 protected override void Apply(IImageProcessingContext ctx, float radiusX, float radiusY) =>
 ctx.Glow(radiusX);
Example #4
0
 protected override void Apply(IImageProcessingContext ctx, Color color) => ctx.Glow(color);
Example #5
0
 /// <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>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static IImageProcessingContext <TPixel> Glow <TPixel>(this IImageProcessingContext <TPixel> source, GraphicsOptions options, TPixel color)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(options, color, ValueSize.PercentageOfWidth(0.5f));
Example #6
0
 /// <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="radius">The the radius.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <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(GraphicsOptions.Default, color, ValueSize.Absolute(radius), rectangle);
Example #7
0
 /// <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="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <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(GraphicsOptions.Default, rectangle);
Example #8
0
 /// <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>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static IImageProcessingContext <TPixel> Glow <TPixel>(this IImageProcessingContext <TPixel> source, GraphicsOptions options, Rectangle rectangle)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(options, NamedColors <TPixel> .Black, ValueSize.PercentageOfWidth(0.5f), rectangle);
Example #9
0
 /// <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="radius">The the radius.</param>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static IImageProcessingContext <TPixel> Glow <TPixel>(this IImageProcessingContext <TPixel> source, GraphicsOptions options, float radius)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(options, NamedColors <TPixel> .Black, ValueSize.Absolute(radius));
Example #10
0
 /// <summary>
 /// Applies a radial glow effect to an image.
 /// </summary>
 /// <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>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Glow(
     this IImageProcessingContext source,
     GraphicsOptions options,
     Color color) =>
 source.Glow(options, color, ValueSize.PercentageOfWidth(0.5f));
Example #11
0
 /// <summary>
 /// Applies a radial glow effect to an image.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Glow(this IImageProcessingContext source, Rectangle rectangle) =>
 source.Glow(new GraphicsOptions(), rectangle);
Example #12
0
 /// <summary>
 /// Applies a radial glow effect to an image.
 /// </summary>
 /// <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>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Glow(
     this IImageProcessingContext source,
     GraphicsOptions options,
     Rectangle rectangle) =>
 source.Glow(options, Color.Black, ValueSize.PercentageOfWidth(0.5f), rectangle);
Example #13
0
 /// <summary>
 /// Applies a radial glow effect to an image.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options effecting things like blending.</param>
 /// <param name="radius">The the radius.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Glow(
     this IImageProcessingContext source,
     GraphicsOptions options,
     float radius) =>
 source.Glow(options, Color.Black, ValueSize.Absolute(radius));
Example #14
0
 protected override void Apply <T>(IImageProcessingContext <T> ctx, T color) => ctx.Glow(color);