IPixelOp.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. using System.Drawing;
  2. namespace PaintDotNet
  3. {
  4. /// <summary>
  5. /// Provides an interface for the methods that UnaryPixelOp and BinaryPixelOp share.
  6. /// For UnaryPixelOp, this produces the function, "dst = F(src)"
  7. /// For BinaryPixelOp, this produces the function, "dst = F(dst, src)"
  8. /// </summary>
  9. public interface IPixelOp
  10. {
  11. /// <summary>
  12. /// This version of Apply has the liberty to decompose the rectangle of interest
  13. /// or do whatever types of optimizations it wants to with it. This is generally
  14. /// done to split the Apply operation into multiple threads.
  15. /// </summary>
  16. void Apply(Surface dst, Point dstOffset, Surface src, Point srcOffset, Size roiSize);
  17. /// <summary>
  18. /// This is the version of Apply that will always do exactly what you tell it do,
  19. /// without optimizations or otherwise.
  20. /// </summary>
  21. void ApplyBase(Surface dst, Point dstOffset, Surface src, Point srcOffset, Size roiSize);
  22. /// <summary>
  23. /// This version of Apply will perform on a scanline, not just a rectangle.
  24. /// </summary>
  25. void Apply(Surface dst, Point dstOffset, Surface src, Point srcOffset, int scanLength);
  26. }
  27. }