Package limn.graphics
Enum Class Sampling
- All Implemented Interfaces:
Serializable,Comparable<Sampling>,Constable
How
Canvas image drawing samples texels when an Image is
drawn at a size other than 1:1. Part of the canvas state
(Canvas.setSampling(limn.graphics.Sampling)), saved/restored with Canvas.save().
Sampling is realized per GPU texture: drawing the same Image with both modes in one frame reconfigures its texture between draws (a batch break each time it flips), so pick one mode per image where possible.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
SMOOTH
Bilinear filtering with mipmaps: photos, icons, scaled artwork. The default. -
PIXELATED
Nearest-neighbor: pixel art stays crisp when scaled up instead of blurring; each source pixel becomes a sharp block.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-