public class SLDStyleFactory extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MARK_SIZE
The default size for Marks when a mark is used, but no size is provided (got from the default
size to be used for SVGs and other scalable graphics when no size is provided)
|
static String |
USE_LEGACY_ANCHOR_POINT_KEY
Java System Property to enable legacy default anchor point.
|
Constructor and Description |
---|
SLDStyleFactory() |
Modifier and Type | Method and Description |
---|---|
Style2D |
createDynamicStyle(SimpleFeature f,
Symbolizer symbolizer,
Range scaleRange)
Creates a rendered style
|
Style2D |
createStyle(Object drawMe,
Symbolizer symbolizer)
Creates a rendered style
Makes use of a symbolizer cache based on identity to avoid recomputing over and over the
same style object and to reduce memory usage.
|
Style2D |
createStyle(Object drawMe,
Symbolizer symbolizer,
Range scaleRange)
Creates a rendered style
Makes use of a symbolizer cache based on identity to avoid recomputing over and over the
same style object and to reduce memory usage.
|
static float[] |
evaluateDashArray(Stroke stroke,
Object feature) |
protected Composite |
getComposite(Fill fill,
Object feature)
Computes the Composite equivalent to the opacity in the SLD Fill
|
static Composite |
getComposite(Map<String,String> options)
Looks up the composite from the vendor options, or returns null if no composite operation has
been specified in the options
|
static Composite |
getComposite(Map<String,String> options,
float defaultOpacity)
Looks up the composite from the vendor options, or returns null if no composite operation has
been specified in the options
|
double |
getHitRatio() |
long |
getHits() |
double |
getMapScaleDenominator()
Getter for property mapScaleDenominator.
|
protected Paint |
getPaint(Fill fill,
Object feature,
Symbolizer symbolizer) |
RenderingHints |
getRenderingHints()
The factory builds a fair number of buffered images to deal with external graphics that need
resizing and the like.
|
long |
getRequests() |
static SortBy[] |
getSortBy(Map<String,String> options)
Returns the sorting directions found in the feature type style
|
boolean |
isLineOptimizationEnabled()
Enabled by default, this optimization speeds up line rendering when the line width is less
than 1.5 pixels when antialiasing is disblaed.
|
boolean |
isVectorRenderingEnabled()
Indicates whether vector rendering should be preferred when painting graphic fills (e.g.,
using a Mark as stipple) or vector Graphic objects such as SVG ExternalGraphics.
|
static int |
lookUpCap(String capType)
DOCUMENT ME!
|
static int |
lookUpJoin(String joinType)
DOCUMENT ME!
|
void |
setLineOptimizationEnabled(boolean lineOptimizationEnabled) |
void |
setMapScaleDenominator(double mapScaleDenominator)
Setter for property mapScaleDenominator.
|
void |
setRenderingHints(RenderingHints renderingHints) |
void |
setVectorRenderingEnabled(boolean vectorRenderingEnabled)
Sets whether vector rendering should be preferred when painting graphic fills (see
isVectorRenderingEnabled() for more details). |
public static final String USE_LEGACY_ANCHOR_POINT_KEY
public static final int DEFAULT_MARK_SIZE
public RenderingHints getRenderingHints()
public void setRenderingHints(RenderingHints renderingHints)
public boolean isLineOptimizationEnabled()
public void setLineOptimizationEnabled(boolean lineOptimizationEnabled)
public boolean isVectorRenderingEnabled()
public void setVectorRenderingEnabled(boolean vectorRenderingEnabled)
isVectorRenderingEnabled()
for more details).vectorRenderingEnabled
- a boolean value indicating whether vector rendering should be
enabled or not.public double getHitRatio()
public long getHits()
public long getRequests()
public Style2D createStyle(Object drawMe, Symbolizer symbolizer)
Makes use of a symbolizer cache based on identity to avoid recomputing over and over the same style object and to reduce memory usage. The same Style2D object will be returned by subsequent calls using the same feature independent symbolizer with the same scaleRange.
drawMe
- The featuresymbolizer
- The SLD symbolizerpublic Style2D createStyle(Object drawMe, Symbolizer symbolizer, Range scaleRange)
Makes use of a symbolizer cache based on identity to avoid recomputing over and over the same style object and to reduce memory usage. The same Style2D object will be returned by subsequent calls using the same feature independent symbolizer with the same scaleRange.
drawMe
- The featuresymbolizer
- The SLD symbolizerscaleRange
- The scale range in which the feature should be painted according to the
symbolizerpublic Style2D createDynamicStyle(SimpleFeature f, Symbolizer symbolizer, Range scaleRange)
f
- The featuresymbolizer
- The SLD symbolizerscaleRange
- The scale range in which the feature should be painted according to the
symbolizerUnsupportedOperationException
- if an unknown symbolizer is passed to this methodpublic static float[] evaluateDashArray(Stroke stroke, Object feature) throws NumberFormatException
NumberFormatException
protected Paint getPaint(Fill fill, Object feature, Symbolizer symbolizer)
protected Composite getComposite(Fill fill, Object feature)
fill
- feature
- public static int lookUpJoin(String joinType)
joinType
- DOCUMENT ME!public static int lookUpCap(String capType)
capType
- DOCUMENT ME!public static Composite getComposite(Map<String,String> options)
options
- public static Composite getComposite(Map<String,String> options, float defaultOpacity)
options
- public static SortBy[] getSortBy(Map<String,String> options)
options
- public double getMapScaleDenominator()
public void setMapScaleDenominator(double mapScaleDenominator)
mapScaleDenominator
- New value of property mapScaleDenominator.Copyright © 1996–2019 Geotools. All rights reserved.