// Copyright (c) Six Labors and contributors. // Licensed under the Apache License, Version 2.0. using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.Primitives; using SixLabors.Memory; namespace SixLabors.ImageSharp.Processing.Processors.Drawing { /// /// Defines a processor to fill pixels withing a given /// with the given and blending defined by the given . /// public class FillRegionProcessor : IImageProcessor { /// /// Initializes a new instance of the class. /// /// The details how to fill the region of interest. /// The region of interest to be filled. /// The configuration options. public FillRegionProcessor(IBrush brush, Region region, GraphicsOptions options) { this.Region = region; this.Brush = brush; this.Options = options; } /// /// Gets the used for filling the destination image. /// public IBrush Brush { get; } /// /// Gets the region that this processor applies to. /// public Region Region { 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 FillRegionProcessor(this); } } }