Package ca.cgjennings.graphics.filters
Enum EdgeHandling
- java.lang.Object
-
- java.lang.Enum<EdgeHandling>
-
- ca.cgjennings.graphics.filters.EdgeHandling
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EdgeHandling>
public enum EdgeHandling extends java.lang.Enum<EdgeHandling>
An enumeration of the options for handling off-image source pixels. When a filter needs to refer (conceptually) to a pixel that lies outside of the actual image data, the edge handling mode describes what value that pixel will be treated as having.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Enum Constant Summary
Enum Constants Enum Constant Description REPEAT
Treat off-edge pixels as equivalent to the pixel value at the edge of the image.WRAP
Treat the image as if it were on an infinite plane tiled with the image in all directions.ZERO
When a pixel value in the output image cannot be determined without referring to an off-image pixel, the output pixel will be zero (a black pixel, with alpha=0 if the destination image has an alpha channel).
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EdgeHandling
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EdgeHandling[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ZERO
public static final EdgeHandling ZERO
When a pixel value in the output image cannot be determined without referring to an off-image pixel, the output pixel will be zero (a black pixel, with alpha=0 if the destination image has an alpha channel).
-
REPEAT
public static final EdgeHandling REPEAT
Treat off-edge pixels as equivalent to the pixel value at the edge of the image.
-
WRAP
public static final EdgeHandling WRAP
Treat the image as if it were on an infinite plane tiled with the image in all directions. (This can also be thought of as wrapping the image around to the opposite edge or mapping it to the surface of a torus.)
-
-
Method Detail
-
values
public static EdgeHandling[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EdgeHandling c : EdgeHandling.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EdgeHandling valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-