コード例 #1
0
ファイル: Glow.cs プロジェクト: bixiu/BlueMine
 /// <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);
コード例 #2
0
ファイル: Glow.cs プロジェクト: bixiu/BlueMine
 /// <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));
コード例 #3
0
ファイル: Glow.cs プロジェクト: bixiu/BlueMine
 /// <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);
コード例 #4
0
ファイル: Glow.cs プロジェクト: bixiu/BlueMine
 /// <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);
コード例 #5
0
ファイル: Glow.cs プロジェクト: bixiu/BlueMine
 /// <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);