com.alkacon.simapi
public class RenderSettings extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.awt.RenderingHints |
HINTS_MEDIUM
Rendering hints for the default
MEDIUM render settigns. |
protected static java.awt.RenderingHints |
HINTS_QUALITY
Rendering hints for the default
QUALITY render settigns. |
protected static java.awt.RenderingHints |
HINTS_SPEED
Rendering hints for the default
SPEED render settigns. |
| Constructor and Description |
|---|
RenderSettings(int baseMode)
Create a new set of render settings, based on the given constant base mode.
|
RenderSettings(int baseMode,
java.awt.RenderingHints hints)
Create a new set of render settings, based on the given constant base mode and the provided
special rendering hints.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImageFilter(java.awt.image.ImageFilter filter)
Adds a new image filter to the filter processing list.
|
float |
getCompressionQuality()
Returns the image save compression quality, used for JPEG images (and other formats that support such a setting).
|
java.util.List<java.awt.image.ImageFilter> |
getImageFilters()
Returns a copy of the list of image filters that should be applied to the processed image.
|
int |
getMaximumBlurSize()
Returns the maximum size of an image that is blurred before applying a downscaling operation.
|
protected java.awt.RenderingHints |
getRenderingHints()
Returns the image rendering hints to to be used for image scaling etc.
|
protected int |
getThreadNicePriority()
Returns the thread priority to use for image operations that require a lot of CPU power.
|
protected int |
getThreadOldPriority()
Returns the stored thread priority used.
|
java.awt.Color |
getTransparentReplaceColor()
Returns the backgound color replacement for the transparent color.
|
boolean |
isUseBlur()
Returns
true if blur is used when downscaling an image to a thumbnail. |
void |
setCompressionQuality(float compressionQuality)
Sets the image save compression quality, used for JPEG images (and other formats that support such a setting).
|
void |
setMaximumBlurSize(int maximumBlurSize)
Sets the maximum size of an image that is blurred before applying a downscaling operation.
|
protected void |
setThreadNicePriority(int threadNicePriority)
Sets the thread priority to use for image operations that require a lot of CPU power.
|
protected void |
setThreadOldPriority(int threadOldPriority)
Sets the stored thread priority.
|
void |
setTransparentReplaceColor(java.awt.Color transparentColor)
Sets the backgound color replacement for the transparent color.
|
protected static final java.awt.RenderingHints HINTS_MEDIUM
MEDIUM render settigns.protected static final java.awt.RenderingHints HINTS_QUALITY
QUALITY render settigns.protected static final java.awt.RenderingHints HINTS_SPEED
SPEED render settigns.public RenderSettings(int baseMode)
baseMode - the base mode of the settings, for example Simapi.RENDER_QUALITYpublic RenderSettings(int baseMode,
java.awt.RenderingHints hints)
baseMode - the base mode of the settings, for example Simapi.RENDER_QUALITYhints - the special rendering hints to use for image processing operations like scaling etc.public void addImageFilter(java.awt.image.ImageFilter filter)
filter - the image filter to addpublic float getCompressionQuality()
This is used only if the image type supports different qualities.
For example, this it is used when writing JPEG images.
A quality of 0.1 is very poor, 0.75 is ok, 1.0 is maximum.
public java.util.List<java.awt.image.ImageFilter> getImageFilters()
public int getMaximumBlurSize()
If the image size is to big, "out of memory" errors may occur.
The default is 2500 x 2500 pixel.
public java.awt.Color getTransparentReplaceColor()
This is used if transparency is not supported by the selected image format.
The default color is Color.WHITE.
public boolean isUseBlur()
true if blur is used when downscaling an image to a thumbnail.This improves the thumbnail quality, but uses a lot more CPU and memory resources.
true if blur is used when downscaling an image to a thumbnailpublic void setCompressionQuality(float compressionQuality)
This is used only if the image type supports different qualities.
For example, this it is used when writing JPEG images.
A quality of 0.1 is very poor, 0.75 is ok, 1.0 is maximum.
compressionQuality - the compression quality to set (must be between 0 and 1)public void setMaximumBlurSize(int maximumBlurSize)
maximumBlurSize - the maximum size of an image to setpublic void setTransparentReplaceColor(java.awt.Color transparentColor)
This is used if transparency is not supported by the selected image format.
transparentColor - the backgound color replacement for the transparent color to setprotected java.awt.RenderingHints getRenderingHints()
This method is protected to avoid changes to the constant values defined in this class.
protected int getThreadNicePriority()
protected int getThreadOldPriority()
protected void setThreadNicePriority(int threadNicePriority)
threadNicePriority - the thread priority to setprotected void setThreadOldPriority(int threadOldPriority)
threadOldPriority - the thread priority to store