public class Effects extends Object
Modifier and Type | Method and Description |
---|---|
static Image |
reflectionImage(Image source)
Takes the given image and appends an effect of reflection bellow it that
is similar to the way elements appear in water beneath them.
|
static Image |
reflectionImage(Image source,
float mirrorRatio,
int alphaRatio)
Takes the given image and appends an effect of reflection bellow it that
is similar to the way elements appear in water beneath them.
|
static Image |
reflectionImage(Image source,
float mirrorRatio,
int alphaRatio,
int spacing)
Takes the given image and appends an effect of reflection bellow it that
is similar to the way elements appear in water beneath them.
|
public static Image reflectionImage(Image source)
source
- image to add the reflection effect topublic static Image reflectionImage(Image source, float mirrorRatio, int alphaRatio)
source
- image to add the reflection effect tomirrorRatio
- generally less than 1, a mirror ration of 0.5f will create a mirror image half the
height of the image, 0.75f will create a 3 quarter height mirror etc.alphaRatio
- starting point for the alpha value in the mirror, this should be a number between 0 - 255
(recommended larger than 0) indicating the opacity of the closest pixel. For a mirror thats completely
opaque use 255. A recommended value would be between 128 to 90.public static Image reflectionImage(Image source, float mirrorRatio, int alphaRatio, int spacing)
source
- image to add the reflection effect tomirrorRatio
- generally less than 1, a mirror ration of 0.5f will create a mirror image half the
height of the image, 0.75f will create a 3 quarter height mirror etc.alphaRatio
- starting point for the alpha value in the mirror, this should be a number between 0 - 255
(recommended larger than 0) indicating the opacity of the closest pixel. For a mirror thats completely
opaque use 255. A recommended value would be between 128 to 90.spacing
- the distance in pixels between the image and its reflection