javalib.worldimages
Interface ImageMap<OtherInfo>
public interface ImageMap<OtherInfo>
A function from Color to Color, suitable for use in the "map" method.
- Since:
- Dec. 28, 2012
- Version:
- Feb. 25, 2013
- Author:
- Stephen Bloch
Method Summary |
Color |
pixelColor(int x,
int y,
Color oldColor,
OtherInfo other)
Given information about a pixel in an existing image, determine the color of a pixel in a new image. |
pixelColor
Color pixelColor(int x,
int y,
Color oldColor,
OtherInfo other)
- Given information about a pixel in an existing image, determine the color of a pixel in a new image.
- Parameters:
x
- the x coordinate of the existing pixely
- the y coordinate of the existing pixeloldColor
- the Color of the existing pixelother
- an arbitrary piece of extra information provided by the caller of "map"
- Returns:
- a Color to be used in the corresponding pixel of the resulting image