gameframe.graphics
Class ColorReplacementEffect
java.lang.Object
|
+--gameframe.graphics.BitmapEffect
|
+--gameframe.graphics.ColorReplacementEffect
- public class ColorReplacementEffect
- extends BitmapEffect
Replaces the colors with other colours given as colour mappings.
- Since:
- GameFrame for Java 0.9.3
- Version:
- GameFrame for Java 0.9.4
- Author:
- Pasi Keränen 18. Mar 2000
Method Summary |
void |
addColourMapping(ColorMapping colourMapping)
Adds a colour mapping to the list of colour mappings to be applied. |
void |
addColourMapping(int replacedColour,
int replacementColour)
Adds a colour to be replaced by another colour. |
BitmapData |
processData(BitmapData data)
Maps the colours with the given colour maps. |
void |
reset()
Resets the effect settings to default values (no colour mappings are applied). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorReplacementEffect
public ColorReplacementEffect()
addColourMapping
public void addColourMapping(int replacedColour,
int replacementColour)
- Adds a colour to be replaced by another colour.
- Parameters:
replacedColour
- The colour to be replaced.replacementColour
- The colour that will replace the colour.
addColourMapping
public void addColourMapping(ColorMapping colourMapping)
- Adds a colour mapping to the list of colour mappings to be applied.
- Parameters:
colourMapping
- The colour mapping to be applied.
reset
public void reset()
- Resets the effect settings to default values (no colour mappings are applied).
- Overrides:
reset
in class BitmapEffect
processData
public BitmapData processData(BitmapData data)
- Maps the colours with the given colour maps.
- Overrides:
processData
in class BitmapEffect
- Parameters:
data
- The raw bitmap data that is to be processed.- Returns:
- The processed bitmap.