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 AbstractImage
apply
(AbstractImage imageData) Apply Filter.default RGBAColor
Apply Filter.default boolean
changed()
Indicates whether the internal state of theFilter
has been changed.static Filter
Search for filter instance by class.boolean
This boolean indicates whether this filter can be applied pixel per pixel (slow).boolean
This 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
null
if not found - See Also:
-
isApplyPixel
boolean isApplyPixel()This boolean indicates whether this filter can be applied pixel per pixel (fast).- Returns:
true
ifapply(RGBAColor)
shall be used
-
isApplyImage
boolean isApplyImage()This boolean indicates whether this filter can be applied pixel per pixel (slow).- Returns:
true
ifapply(AbstractImage)
shall be used
-
changed
default boolean changed()Indicates whether the internal state of theFilter
has been changed.- Returns:
true
if state changed,false
otherwise
-
apply
Apply Filter.- Parameters:
color
- the original color- Returns:
- the new color
-
apply
Apply Filter.- Parameters:
imageData
- the original data- Returns:
- the new Data
-