//
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
//
namespace ImageProcessorCore
{
///
/// A delegate which is called as progress is made processing an image.
///
/// The source of the event.
/// An object that contains the event data.
public delegate void ProgressEventHandler(object sender, ProgressEventArgs e);
///
/// Encapsulates methods to alter the pixels of an image.
///
public interface IImageProcessor
{
///
/// Event fires when each row of the source image has been processed.
///
///
/// This event may be called from threads other than the client thread, and from multiple threads simultaneously.
/// Individual row notifications may arrived out of order.
///
event ProgressEventHandler OnProgress;
///
/// Applies the process to the specified portion of the specified .
///
/// Target image to apply the process to.
/// The source image. Cannot be null.
///
/// The structure that specifies the portion of the image object to draw.
///
///
/// The method keeps the source image unchanged and returns the
/// the result of image processing filter as new image.
///
///
/// is null or is null.
///
///
/// doesnt fit the dimension of the image.
///
void Apply(ImageBase target, ImageBase source, Rectangle sourceRectangle);
///
/// Applies the process to the specified portion of the specified at the specified
/// location and with the specified size.
///
/// Target image to apply the process to.
/// The source image. Cannot be null.
/// The target width.
/// The target height.
///
/// The structure that specifies the location and size of the drawn image.
/// The image is scaled to fit the rectangle.
///
///
/// The structure that specifies the portion of the image object to draw.
///
///
/// The method keeps the source image unchanged and returns the
/// the result of image process as new image.
///
void Apply(ImageBase target, ImageBase source, int width, int height, Rectangle targetRectangle, Rectangle sourceRectangle);
}
}