public class BaseRenderSettings extends AbstractListenableRenderSettings
Modifier and Type | Class and Description |
---|---|
static class |
BaseRenderSettings.Clipping
An enumeration describing what kind of clipping is applied before rendering a part of the model
(which usually starts at the page level).
|
Modifier and Type | Field and Description |
---|---|
static String |
ALL_LAYERS_ENABLED
Identifier key for all-layer enabled state change, used within a
RenderSettingsEvent to
recognize the kind of change which happen. |
static String |
ANTI_ALIASING_MODE
Identifier key for an anti-aliasing mode change, used within a
RenderSettingsEvent to
recognize the kind of change which happens. |
static String |
CLIPPING
Identifier key for a clipping type change.
|
static String |
DEVICE_RESOLUTION
Identifier key for a change of the device resolution, used within a
RenderSettingsEvent
to recognize the kind of change which happen. |
static String |
LAYER_ENABLED
Identifier key for a layer enabled state change, used within a
RenderSettingsEvent to
recognize the kind of change which happens. |
static String |
ROTATION
Identifier key for a rotation change, used within a
RenderSettingsEvent to recognize the
kind of change which happen. |
static String |
ZOOM
Identifier key for a zoom change, used within a
RenderSettingsEvent to recognize the kind
of change which happen. |
Constructor and Description |
---|
BaseRenderSettings() |
Modifier and Type | Method and Description |
---|---|
double |
baseToDevice(double value)
Utility method: convert base units to device units and apply zoom factor
|
int |
baseToDevice(int value)
Utility method: convert base units to device units and apply zoom factor
|
BaseRenderSettings |
createSnapshot()
Creates and returns a snapshot copy of this settings instance.
|
double |
deviceToBase(double value)
Utility method: convert device units to base units and unapply zoom factor
|
int |
deviceToBase(int value)
Utility method: convert device units to base units and unapply zoom factor
|
void |
disableAllLayers()
Disables the rendering of all standard layers provided by the
DocumentLayer class and
explicit enabled layers (defined by a call of
setDocumentLayerEnabled(DocumentLayer, boolean) with a true boolean parameter). |
void |
enableAllLayers()
Enables the rendering of all standard layers provided by the
DocumentLayer class and
explicit disabled layers (defined by a call of
setDocumentLayerEnabled(DocumentLayer, boolean) with a false boolean parameter). |
boolean |
equals(Object obj) |
AffineTransform |
getAffineTransform()
Gets the affine transform for this render context, useful for converting from document to device
space.
|
AffineTransform |
getAffineTransform(Dimension2D srcSize)
Gets the affine transform for this render setting, useful for converting from document to device
space.
|
AntiAliasingMode |
getAntiAliasingMode()
Returns the anti-aliasing mode for shape and text rendering
|
BaseRenderSettings.Clipping |
getClipping()
Return the clipping type.
|
int |
getDeviceResolution()
Gets the device resolution.
|
AffineTransform |
getInverseTransform(Dimension2D pageSize)
Gets the inverse affine transform for this render context, useful for converting from device to
document space.
|
List<DocumentLayer> |
getOrderedAndActiveLayers(Collection<DocumentLayer> candidateLayers)
Returns a collection of candidate layers in an ordering suitable for rendering.
|
QuadrantRotation |
getRotation()
Gets the rotation angle.
|
float |
getZoom()
Gets the zoom factor.
|
int |
hashCode() |
boolean |
isDocumentLayerEnabled(DocumentLayer layer)
Returns whether layer class should be rendered or not.
|
boolean |
isEnlargeThinStrokeRendering()
Return whether 0 width lines should be rendered as 1 pixel width lines
|
void |
setAntiAliasingMode(AntiAliasingMode antiAliasingMode)
Sets the anti-aliasing mode for shape and text rendering.
|
void |
setClipping(BaseRenderSettings.Clipping clipping)
Set the clipping type.
|
void |
setDeviceResolution(int deviceResolution)
Sets the device resolution.
|
void |
setDocumentLayerEnabled(DocumentLayer layer,
boolean value)
Sets a flag whether document layer of given class should be rendered or not.
|
void |
setEnlargeThinStrokeRendering(boolean enlargeThinStrokeRendering)
Sets if 0 width lines should be rendered as 1 pixel width lines
|
void |
setRotation(QuadrantRotation r)
Sets the rotation angle.
|
void |
setZoom(float zoomFactor)
Sets the zoom factor.
|
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 ANTI_ALIASING_MODE
RenderSettingsEvent
to
recognize the kind of change which happens.public static final String LAYER_ENABLED
RenderSettingsEvent
to
recognize the kind of change which happens.public static final String ALL_LAYERS_ENABLED
RenderSettingsEvent
to
recognize the kind of change which happen.public static final String ROTATION
RenderSettingsEvent
to recognize the
kind of change which happen.public static final String ZOOM
RenderSettingsEvent
to recognize the kind
of change which happen.setZoom(float)
,
getZoom()
,
Constant Field Valuespublic static final String CLIPPING
setClipping(Clipping)
,
getClipping()
,
Constant Field Valuespublic static final String DEVICE_RESOLUTION
RenderSettingsEvent
to recognize the kind of change which happen.public void setDocumentLayerEnabled(DocumentLayer layer, boolean value)
layer
- Document layer.value
- Flagpublic void enableAllLayers()
DocumentLayer
class and
explicit disabled layers (defined by a call of
setDocumentLayerEnabled(DocumentLayer, boolean)
with a false boolean parameter).
Standard layers provided by the DocumentLayer
class are:
setDocumentLayerEnabled(DocumentLayer, boolean)
is
advised.public void disableAllLayers()
DocumentLayer
class and
explicit enabled layers (defined by a call of
setDocumentLayerEnabled(DocumentLayer, boolean)
with a true boolean parameter).
Standard layers provided by the DocumentLayer
class are:
setDocumentLayerEnabled(DocumentLayer, boolean)
is
advised.public boolean isDocumentLayerEnabled(DocumentLayer layer)
public List<DocumentLayer> getOrderedAndActiveLayers(Collection<DocumentLayer> candidateLayers)
DocumentLayer.compareTo(DocumentLayer)
method.
public BaseRenderSettings createSnapshot()
public AntiAliasingMode getAntiAliasingMode()
AntiAliasingMode
public void setAntiAliasingMode(AntiAliasingMode antiAliasingMode)
antiAliasingMode
- AntiAliasingMode
public QuadrantRotation getRotation()
QuadrantRotation
public void setRotation(QuadrantRotation r)
r
- The rotation angle to set See also QuadrantRotation
public float getZoom()
public void setZoom(float zoomFactor)
zoomFactor
- The zoomFactor to setpublic int getDeviceResolution()
public void setDeviceResolution(int deviceResolution)
deviceResolution
- The device resolution to setpublic int baseToDevice(int value)
value
- value in base unitspublic double baseToDevice(double value)
value
- value in base unitspublic int deviceToBase(int value)
value
- value in device unitspublic double deviceToBase(double value)
value
- value in device unitspublic AffineTransform getAffineTransform()
public AffineTransform getAffineTransform(Dimension2D srcSize)
srcSize
- the size of the object to be rendered in source (document) coordinates.public AffineTransform getInverseTransform(Dimension2D pageSize)
pageSize
- the pages size in base unitspublic 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 BaseRenderSettings.Clipping getClipping()
public void setClipping(BaseRenderSettings.Clipping clipping)
clipping
- the clipping typepublic boolean isEnlargeThinStrokeRendering()
true
if 0 width lines should be rendered as 1 pixel width lines , otherwise
false
public void setEnlargeThinStrokeRendering(boolean enlargeThinStrokeRendering)
enlargeThinStrokeRendering
- true
if 0 width lines should be rendered as 1 pixel
width lines , otherwise false
Copyright © 2024 levigo holding gmbh. All rights reserved.