// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System.Threading.Tasks;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Memory;
namespace SixLabors.ImageSharp.Processing.Processors.Drawing
{
///
/// Defines a processor to fill an with the given
/// using blending defined by the given .
///
public class FillProcessor : IImageProcessor
{
///
/// Initializes a new instance of the class.
///
/// The brush to use for filling.
/// The defining how to blend the brush pixels over the image pixels.
public FillProcessor(IBrush brush, GraphicsOptions options)
{
this.Brush = brush;
this.Options = options;
}
///
/// Gets the used for filling the destination image.
///
public IBrush Brush { get; }
///
/// Gets the defining how to blend the brush pixels over the image pixels.
///
public GraphicsOptions Options { get; }
///
public IImageProcessor CreatePixelSpecificProcessor()
where TPixel : struct, IPixel
{
return new FillProcessor(this);
}
}
}