Beispiel #1
0
 /// <summary>
 /// Applies a radial vignette 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 pixel blending.</param>
 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
 public static IImageProcessingContext <TPixel> Vignette <TPixel>(this IImageProcessingContext <TPixel> source, GraphicsOptions options)
     where TPixel : struct, IPixel <TPixel>
 => source.VignetteInternal(NamedColors <TPixel> .Black, ValueSize.PercentageOfWidth(.5f), ValueSize.PercentageOfHeight(.5f), options);
Beispiel #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="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);
Beispiel #3
0
 private static IImageProcessingContext <TPixel> VignetteInternal <TPixel>(this IImageProcessingContext <TPixel> source, TPixel color, ValueSize radiusX, ValueSize radiusY, GraphicsOptions options)
     where TPixel : struct, IPixel <TPixel>
 => source.ApplyProcessor(new VignetteProcessor <TPixel>(color, radiusX, radiusY, options));
Beispiel #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>
 /// <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);
Beispiel #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="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>(source.MemoryManager, color, radius, options));
Beispiel #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="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);
Beispiel #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="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);
Beispiel #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="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)
     where TPixel : struct, IPixel <TPixel>
 => source.ApplyProcessor(new GlowProcessor <TPixel>(color, radius, options), rectangle);