/// <summary>
 /// Flood fills the image within the provided region defined by an <see cref="IPath"/> using the specified brush
 /// without any blending.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="region">The <see cref="IPath"/> defining the region to fill.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     IBrush brush,
     IPath region)
 => source.Clear(source.GetDrawingOptions(), brush, region);
 /// <summary>
 /// Flood fills the image in the shape of the provided rectangle with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="color">The color.</param>
 /// <param name="shape">The shape.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(this IImageProcessingContext source, Color color, RectangleF shape) =>
 source.Clear(new SolidBrush(color), shape);
 /// <summary>
 /// Flood fills the image within the provided region defined by an <see cref="IPath"/> using the specified color
 /// without any blending.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="options">The drawing options.</param>
 /// <param name="color">The color.</param>
 /// <param name="region">The <see cref="IPath"/> defining the region to fill.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     DrawingOptions options,
     Color color,
     IPath region)
 => source.Clear(options, new SolidBrush(color), region);
 /// <summary>
 /// Flood fills the image in the shape of the provided rectangle with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="shape">The shape.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(this IImageProcessingContext source, IBrush brush, RectangleF shape) =>
 source.Clear(brush, new RectangularPolygon(shape.X, shape.Y, shape.Width, shape.Height));
 /// <summary>
 /// Flood fills the image in the shape of the provided rectangle with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="color">The color.</param>
 /// <param name="shape">The shape.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     ShapeGraphicsOptions options,
     Color color,
     RectangleF shape) =>
 source.Clear(options, new SolidBrush(color), shape);
Example #6
0
 /// <summary>
 /// Flood fills the image at the given rectangle bounds with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The drawing options.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="rectangle">The rectangle defining the region to fill.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     DrawingOptions options,
     IBrush brush,
     RectangleF rectangle)
 => source.Clear(options, brush, new RectangularPolygon(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height));
 /// <summary>
 /// Flood fills the image with the specified color without any blending.
 /// </summary>
 /// <param name="source">The image processing context.</param>
 /// <param name="color">The color.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(this IImageProcessingContext source, Color color)
 => source.Clear(new SolidBrush(color));
Example #8
0
 /// <summary>
 /// Flood fills the image in the rectangle of the provided rectangle with the specified color without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The drawing options.</param>
 /// <param name="color">The color.</param>
 /// <param name="rectangle">The rectangle defining the region to fill.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     DrawingOptions options,
     Color color,
     RectangleF rectangle)
 => source.Clear(options, new SolidBrush(color), rectangle);
 /// <summary>
 /// Flood fills the image with the specified color without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The graphics options.</param>
 /// <param name="color">The color.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     GraphicsOptions options,
     Color color) =>
 source.Clear(options, new SolidBrush(color));
 /// <summary>
 /// Flood fills the image with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="brush">The details how to fill the region of interest.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(this IImageProcessingContext source, IBrush brush) =>
 source.Clear(source.GetGraphicsOptions(), brush);
Example #11
0
 /// <summary>
 /// Flood fills the image in the shape of the provided polygon with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="options">The options.</param>
 /// <param name="color">The color.</param>
 /// <param name="path">The path.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(
     this IImageProcessingContext source,
     ShapeGraphicsOptions options,
     Color color,
     IPath path) =>
 source.Clear(options, new SolidBrush(color), path);
 /// <summary>
 /// Flood fills the image with in the region with the specified brush without any blending.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="region">The region.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext Clear(this IImageProcessingContext source, IBrush brush, Region region) =>
 source.Clear(source.GetShapeGraphicsOptions(), brush, region);