Interface Filter

All Known Implementing Classes:
BoxBlurFilter, GrayscaleFilter

public interface Filter
A filter is a transformation that can be applied to an area of pixels. This interface is tailored towards filters, but you can also use it for non-filter transformations.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    apply​(MapGraphics<?,​?> graphics, int x, int y, int minX, int maxX, int minY, int maxY)
    Gets the transformed color for a specific pixel
    int
    The amount of times this filter should be applied
  • Method Details

    • apply

      byte apply(MapGraphics<?,​?> graphics, int x, int y, int minX, int maxX, int minY, int maxY)
      Gets the transformed color for a specific pixel
      Parameters:
      graphics - The parent graphics
      x - The pixel x
      y - The pixel y
      minX - The min x of the area
      maxX - The max x of the area
      minY - The min y of the area
      maxY - The max y of the area
      Returns:
      The transformed color
    • passes

      int passes()
      The amount of times this filter should be applied
      Returns:
      The passes