LuciadCPillar 2023.1.04
|
Builder for raster styles. More...
#include <luciad/layers/styles/RasterStyle.h>
Public Member Functions | |
Builder (const Builder &other) | |
~Builder () | |
Builder & | brightness (double brightness) |
Sets the brightness. More... | |
RasterStyle | build () const |
Returns a newly created raster style, based on the properties set on this builder. More... | |
Builder & | contrast (double contrast) |
Sets the contrast. More... | |
Builder & | modulationColor (Color color) |
Sets the color that is modulated with the raster. More... | |
Builder & | opacity (double opacity) |
Sets the opacity of the raster. More... | |
Builder for raster styles.
The default raster style has a white modulation color, with brightness, contrast and transparency values all equal to 1.
Example usage:
luciad::RasterStyle::Builder::Builder | ( | const Builder & | other | ) |
luciad::RasterStyle::Builder::~Builder | ( | ) |
Builder & luciad::RasterStyle::Builder::brightness | ( | double | brightness | ) |
Sets the brightness.
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.
This parameter is optional. If not set, default is 1.
brightness | the brightness |
luciad::InvalidArgumentException | when brightness < 0 or brightness > 2. |
RasterStyle luciad::RasterStyle::Builder::build | ( | ) | const |
Returns a newly created raster style, based on the properties set on this builder.
Builder & luciad::RasterStyle::Builder::contrast | ( | double | contrast | ) |
Sets the contrast.
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.
This parameter is optional. If not set, default is 1.
contrast | the contrast |
luciad::InvalidArgumentException | when contrast < 0 or contrast > 2. |
Sets the color that is modulated with the raster.
For example using a raster with gray-scale colors and a red modulation color will result in a resulting painted raster with red hues.
Using a white color has no effect.
This parameter is optional. If not set, default is white.
color | the modulation color |
Builder & luciad::RasterStyle::Builder::opacity | ( | double | opacity | ) |
Sets the opacity of the raster.
This can also be achieved by setting a modulation color with opacity directly. When both opacity and a modulation color are set, the opacity set using this method takes precedence over that of the modulation color.
This parameter is optional. If not set, default is 1.
opacity | the alpha value. Must be contained in the [0, 1] interval (0 is fully transparent, 1 is fully opaque). |
luciad::InvalidArgumentException | when opacity < 0 or opacity > 1. |