public class ImageRenderSettings extends AbstractListenableRenderSettings
SerializableProcessingSettings
type which controls various aspects of the image
rendering process like desaturation, gradation or image filtering.Modifier and Type | Field and Description |
---|---|
static String |
DESATURATION
Identifier key for a desaturation change, used within a
RenderSettingsEvent to recognize
the kind of change which happen. |
static String |
FILTER
Identifier key for a filter change, used within a
RenderSettingsEvent to recognize the
kind of change which happen. |
static String |
GRADATION_CURVE
Identifier key for a gradation change, used within a
RenderSettingsEvent to recognize the
kind of change which happen. |
static String |
LAYER_APPLICABILITY
Property prefix key for a change to the
setAppliesToLayer(DocumentLayer, boolean) /
isAppliesToLayer(DocumentLayer) property. |
static String |
USE_UPSCALING
Identifier key for a change to the
setUseUpscalingFilter(boolean) /
isUseUpscalingFilter() property. |
Constructor and Description |
---|
ImageRenderSettings()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
applyToAllLayers()
Sets this settings instance to apply to all document layers.
|
ImageRenderSettings |
createSnapshot()
Creates and returns a snapshot copy of this settings instance.
|
boolean |
equals(Object obj) |
FilterType |
getFilterType()
Returns the filter type to be applied.
|
GradationCurve |
getGradationCurve()
Returns the gradation curve to be applied to the image.
|
Function<ImageSourceInformation,Boolean> |
getSourceSizeLimitCheck() |
int |
hashCode() |
boolean |
isAppliesToLayer(DocumentLayer layer)
Returns whether this settings instance applies to the given document layer.
|
boolean |
isDesaturate()
Returns whether the desaturation is activated
|
boolean |
isUseUpscalingFilter() |
void |
setAppliesToLayer(DocumentLayer layer,
boolean value)
Set whether this ImageRenderSettings instance shall apply to the given document layer or not.
|
void |
setDesaturate(boolean desaturate)
Changes whether desaturation is active or not.
|
void |
setFilterType(FilterType filterType)
Changes the filter type to be applied.
|
void |
setGradationCurve(GradationCurve gradationCurve)
Sets the gradation curve to be applied to the image.
|
void |
setSourceSizeLimitCheck(Function<ImageSourceInformation,Boolean> sourceSizeLimitCheck) |
void |
setUseUpscalingFilter(boolean useUpscalingFilter)
Set whether to use the filter type set via
setFilterType(FilterType) to up-sample (scale
larger than original size) images also. |
void |
update(String propertyName,
RenderSettings other,
Object... details)
Updates this instance property specified by given property name with the value provided by the
other processing setting.
|
fireChanged, getSettingsChangeHandler, setSettingsChangeHandler
public static final String GRADATION_CURVE
RenderSettingsEvent
to recognize the
kind of change which happen.public static final String DESATURATION
RenderSettingsEvent
to recognize
the kind of change which happen.public static final String FILTER
RenderSettingsEvent
to recognize the
kind of change which happen.public static final String USE_UPSCALING
setUseUpscalingFilter(boolean)
/
isUseUpscalingFilter()
property.public static final String LAYER_APPLICABILITY
setAppliesToLayer(DocumentLayer, boolean)
/
isAppliesToLayer(DocumentLayer)
property. The actual property key is derived by
appending "." and the layer name to this prefix.public ImageRenderSettings createSnapshot()
public Function<ImageSourceInformation,Boolean> getSourceSizeLimitCheck()
public void setSourceSizeLimitCheck(Function<ImageSourceInformation,Boolean> sourceSizeLimitCheck)
public GradationCurve getGradationCurve()
public void setGradationCurve(GradationCurve gradationCurve)
GradationCurve()
.gradationCurve
- the new gradation curvepublic boolean isDesaturate()
public void setDesaturate(boolean desaturate)
desaturate
- true
for active, otherwise false
public FilterType getFilterType()
FilterType
public void setFilterType(FilterType filterType)
null
. To clear
prior filter type changes, use FilterType.getDefaultFilterType()
as new filter.public void update(String propertyName, RenderSettings other, Object... details)
RenderSettings
propertyName
- the name of the property to update. Update supported properties have unique
property identifier provided by the specific render settings implementation.other
- the processing setting which provide the new property value. Therefore the other
processing setting have to be of the same type as this instance.details
- (optional) if some describing details are necessary to do a specific update, the
details parameter will transport this informationspublic void setUseUpscalingFilter(boolean useUpscalingFilter)
setFilterType(FilterType)
to up-sample (scale
larger than original size) images also. If set to true
the scaling filter is used to
create images larger than original size resulting in a smooth appearance. If set to
false
, the image is up-scaled on the fly during rendering using a simple
nearest-neighbor interpolation resulting in a jagged appearance but reduced rendering time and
memory consumption.public boolean isUseUpscalingFilter()
setUseUpscalingFilter(boolean)
public void setAppliesToLayer(DocumentLayer layer, boolean value)
layer
- the document layer.value
- true
if this settings instance shall apply to the given layerpublic boolean isAppliesToLayer(DocumentLayer layer)
layer
- the document layerpublic void applyToAllLayers()
Copyright © 2024 levigo holding gmbh. All rights reserved.