|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.graphics.sld.Drawing_Impl
org.deegree_impl.graphics.sld.Stroke_Impl
A Stroke allows a string of line segments (or any linear geometry) to be rendered. There are three basic types of strokes: solid Color, GraphicFill (stipple), and repeated GraphicStroke. A repeated graphic is plotted linearly and has its graphic symbol bended around the curves of the line string. The default is a solid black line (Color "#000000").
The supported CSS-Parameter names are:
Field Summary | |
private java.awt.Color |
color
|
private GraphicStroke |
graphicStroke
|
private float[] |
smplDashArray
|
private float |
smplDashOffset
|
private int |
smplLineCap
|
private int |
smplLineJoin
|
private double |
smplOpacity
|
private double |
smplWidth
|
Fields inherited from class org.deegree_impl.graphics.sld.Drawing_Impl |
cssParams, graphicFill |
Fields inherited from interface org.deegree.graphics.sld.Stroke |
COLOR_DEFAULT, LC_BUTT, LC_DEFAULT, LC_ROUND, LC_SQUARE, LJ_BEVEL, LJ_DEFAULT, LJ_MITRE, LJ_ROUND, OPACITY_DEFAULT, WIDTH_DEFAULT |
Constructor Summary | |
protected |
Stroke_Impl()
Constructs a new Stroke_Impl. |
protected |
Stroke_Impl(java.util.HashMap cssParams,
GraphicStroke graphicStroke,
GraphicFill graphicFill)
Constructs a new Stroke_Impl. |
Method Summary | |
java.lang.String |
exportAsXML()
exports the content of the Stroke as XML formated String |
private void |
extractSimpleColor()
extracts the color of the stroke if it is simple (nor Expression) to avoid new calculation for each call of getStroke(Feature feature) |
private void |
extractSimpleDasharray()
extracts the dasharray of the stroke if it is simple (no Expression) to avoid new calculation for each call of getStroke(Feature feature) |
private void |
extractSimpleDashOffset()
extracts the dash offset of the stroke if it is simple (no Expression) to avoid new calculation for each call of getStroke(Feature feature) |
private void |
extractSimpleLineCap()
extracts the line cap of the stroke if it is simple (no Expression) to avoid new calculation for each call of getStroke(Feature feature) |
private void |
extractSimpleLineJoin()
extracts the line join of the stroke if it is simple (no Expression) to avoid new calculation for each call of getStroke(Feature feature) |
private void |
extractSimpleOpacity()
extracts the opacity of the stroke if it is simple (no Expression) to avoid new calculation for each call of getStroke(Feature feature) |
private void |
extractSimpleWidth()
extracts the width of the stroke if it is simple (no Expression) to avoid new calculation for each call of getStroke(Feature feature) |
float[] |
getDashArray(Feature feature)
Evaluates the 'stroke-dasharray' parameter as defined in OGC 02-070. |
float |
getDashOffset(Feature feature)
The stroke-dashoffset CssParameter element specifies the distance as a float into the stroke-dasharray pattern at which to start drawing. |
GraphicStroke |
getGraphicStroke()
The GraphicStroke element both indicates that a repeated-linear-graphic stroke type will be used. |
int |
getLineCap(Feature feature)
Thestroke-linecap CssParameter element encode enumerated values telling how line strings should be capped (at the two ends of the line string). |
int |
getLineJoin(Feature feature)
The stroke-linejoin CssParameter element encode enumerated values telling how line strings should be joined (between line segments). |
double |
getOpacity(Feature feature)
The stroke-opacity CssParameter element specifies the level of translucency to use when rendering the stroke. |
java.awt.Color |
getStroke(Feature feature)
The stroke CssParameter element gives the solid color that will be used for a stroke. |
double |
getWidth(Feature feature)
The stroke-width CssParameter element gives the absolute width (thickness) of a stroke in pixels encoded as a float. |
private boolean |
isSimple(CssParameter cssParam)
returns true if the passed CssParameter contain a simple value |
void |
setDashArray(float[] dashArray)
|
void |
setDashOffset(float dashOffset)
The stroke-dashoffset CssParameter element specifies the distance as a float into the stroke-dasharray pattern at which to start drawing. |
void |
setGraphicStroke(GraphicStroke graphicStroke)
The GraphicStroke element both indicates that a repeated-linear-graphic stroke type will be used. |
void |
setLineCap(int lineCap)
|
void |
setLineJoin(int lineJoin)
|
void |
setOpacity(double opacity)
|
void |
setStroke(java.awt.Color stroke)
|
void |
setWidth(double width)
|
Methods inherited from class org.deegree_impl.graphics.sld.Drawing_Impl |
addCssParameter, getCssParameters, getGraphicFill, removeCssParameter, setCssParameters, setGraphicFill |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.deegree.graphics.sld.Drawing |
addCssParameter, getCssParameters, getGraphicFill, removeCssParameter, setCssParameters, setGraphicFill |
Field Detail |
private GraphicStroke graphicStroke
private java.awt.Color color
private double smplOpacity
private double smplWidth
private int smplLineJoin
private int smplLineCap
private float[] smplDashArray
private float smplDashOffset
Constructor Detail |
protected Stroke_Impl()
protected Stroke_Impl(java.util.HashMap cssParams, GraphicStroke graphicStroke, GraphicFill graphicFill)
cssParams
- keys are Strings (see above), values are
CssParametersMethod Detail |
private void extractSimpleColor() throws FilterEvaluationException
FilterEvaluationException
private boolean isSimple(CssParameter cssParam)
private void extractSimpleOpacity() throws FilterEvaluationException
FilterEvaluationException
private void extractSimpleWidth() throws FilterEvaluationException
FilterEvaluationException
private void extractSimpleLineJoin() throws FilterEvaluationException
FilterEvaluationException
private void extractSimpleLineCap() throws FilterEvaluationException
FilterEvaluationException
private void extractSimpleDasharray() throws FilterEvaluationException
FilterEvaluationException
private void extractSimpleDashOffset() throws FilterEvaluationException
FilterEvaluationException
public GraphicStroke getGraphicStroke()
getGraphicStroke
in interface Stroke
public void setGraphicStroke(GraphicStroke graphicStroke)
setGraphicStroke
in interface Stroke
graphicStroke
- the graphicStroke element
public java.awt.Color getStroke(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation
of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setStroke(java.awt.Color stroke)
public double getOpacity(Feature feature) throws FilterEvaluationException
getOpacity
in interface Stroke
feature
- specifies the Feature to be used for evaluation
of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setOpacity(double opacity)
setOpacity
in interface Stroke
public double getWidth(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation
of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setWidth(double width)
public int getLineJoin(Feature feature) throws FilterEvaluationException
getLineJoin
in interface Stroke
feature
- specifies the Feature to be used for evaluation
of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setLineJoin(int lineJoin)
setLineJoin
in interface Stroke
public int getLineCap(Feature feature) throws FilterEvaluationException
getLineCap
in interface Stroke
feature
- specifies the Feature to be used for evaluation
of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setLineCap(int lineCap)
setLineCap
in interface Stroke
public float[] getDashArray(Feature feature) throws FilterEvaluationException
getDashArray
in interface Stroke
feature
- the encoded pattern
FilterEvaluationException
- if the eevaluation fails or the
encoded pattern is erroneouspublic void setDashArray(float[] dashArray)
setDashArray
in interface Stroke
public float getDashOffset(Feature feature) throws FilterEvaluationException
getDashOffset
in interface Stroke
feature
- specifies the Feature to be used for evaluation
of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setDashOffset(float dashOffset)
setDashOffset
in interface Stroke
dashOffset
- the dashOffset to be set for the Strokepublic java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |