Package rekit.logic.filters
Interface Filter
- All Known Implementing Classes:
GrayScaleMode,InvertedMode,RandomMode
public interface Filter
This interface defines all kind of image filters for the game.
- Author:
- Dominik Fuchss
-
Field Summary
FieldsModifier and TypeFieldDescriptionAll filters which was found at init time. -
Method Summary
Modifier and TypeMethodDescriptiondefault AbstractImageapply(AbstractImage imageData) Apply Filter.default RGBAColorApply Filter.default booleanchanged()Indicates whether the internal state of theFilterhas been changed.static FilterSearch for filter instance by class.booleanThis boolean indicates whether this filter can be applied pixel per pixel (slow).booleanThis boolean indicates whether this filter can be applied pixel per pixel (fast).
-
Field Details
-
ALL_FILTERS
All filters which was found at init time.
-
-
Method Details
-
get
Search for filter instance by class.- Parameters:
filter- the filter class- Returns:
- the filter or
nullif not found - See Also:
-
isApplyPixel
boolean isApplyPixel()This boolean indicates whether this filter can be applied pixel per pixel (fast).- Returns:
trueifapply(RGBAColor)shall be used
-
isApplyImage
boolean isApplyImage()This boolean indicates whether this filter can be applied pixel per pixel (slow).- Returns:
trueifapply(AbstractImage)shall be used
-
changed
default boolean changed()Indicates whether the internal state of theFilterhas been changed.- Returns:
trueif state changed,falseotherwise
-
apply
Apply Filter.- Parameters:
color- the original color- Returns:
- the new color
-
apply
Apply Filter.- Parameters:
imageData- the original data- Returns:
- the new Data
-