Exemplo n.º 1
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="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, GraphicsOptions options)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(color, ValueSize.PercentageOfWidth(0.5f), options);
Exemplo n.º 2
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="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)
     where TPixel : struct, IPixel <TPixel>
 => source.ApplyProcessor(new GlowProcessor <TPixel>(color, radius, options));
Exemplo n.º 3
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>
 /// <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)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(NamedColors <TPixel> .Black, ValueSize.PercentageOfWidth(0.5f), rectangle, options);
Exemplo n.º 4
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>
 /// <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)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(color, ValueSize.Absolute(radius), rectangle, options);
Exemplo n.º 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="radius">The the radius.</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, float radius, GraphicsOptions options)
     where TPixel : struct, IPixel <TPixel>
 => source.Glow(NamedColors <TPixel> .Black, ValueSize.Absolute(radius), options);