public final class RasterStyle extends Object implements AutoCloseable
Construction of a raster style is done through the Builder
design pattern mechanism.
Modifier and Type | Class and Description |
---|---|
static class |
RasterStyle.Builder
Builder for raster styles.
|
Modifier and Type | Method and Description |
---|---|
RasterStyle.Builder |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
void |
close() |
boolean |
equals(Object other) |
protected void |
finalize() |
double |
getBrightness()
Gets the brightness.
|
double |
getContrast()
Gets the contrast.
|
android.graphics.Color |
getModulationColor()
Gets the color that is modulated with the raster.
|
int |
hashCode() |
static RasterStyle.Builder |
newBuilder()
Creates a new builder with the default values.
|
public void close()
close
in interface AutoCloseable
@NotNull public static RasterStyle.Builder newBuilder()
@NotNull public RasterStyle.Builder asBuilder()
public double getBrightness()
The brightness is a value in [0, 2]
. A value of 1 (the default) leaves the brightness unchanged. Values larger than 1 makes the colors brighter, while a value smaller than 1 makes the colors less bright.
public double getContrast()
The contrast is a value in [0, 2]
. A value of 1 (the default) leaves the contrast unchanged. A value larger than 1 enhances the contrast of dark colors by making them brighter, while a value smaller than 1 enhances the contrast of bright colors by making them darker.
@NotNull public android.graphics.Color getModulationColor()
For example using a raster with gray-scale colors and a red modulation color will result in a resulting painted raster with red hues.