|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.sld.Drawing org.deegree.graphics.sld.Stroke
public class Stroke
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 | |
---|---|
static java.awt.Color |
COLOR_DEFAULT
Default color is black. |
static int |
LC_BUTT
Wraps the java.awt.BasicStroke.CAP_BUTT constant (why) |
static int |
LC_DEFAULT
default line end is butt |
static int |
LC_ROUND
Wraps the java.awt.BasicStroke.CAP_ROUND constant (why) |
static int |
LC_SQUARE
Wraps the java.awt.BasicStroke.CAP_SQUARE constant (why) |
static int |
LJ_BEVEL
Wraps the java.awt.BasicStroke.JOIN_BEVEL constant (why) |
static int |
LJ_DEFAULT
Default Line join is mitre |
static int |
LJ_MITRE
Wraps the java.awt.BasicStroke.JOIN_MITER constant (why) |
static int |
LJ_ROUND
Wraps the java.awt.BasicStroke.JOIN_ROUND constant (why) |
static double |
OPACITY_DEFAULT
Default opacity is 1 |
static double |
WIDTH_DEFAULT
Default with is 1 |
Fields inherited from class org.deegree.graphics.sld.Drawing |
---|
cssParams, graphicFill |
Constructor Summary | |
---|---|
protected |
Stroke()
Constructs a new Stroke. |
|
Stroke(java.util.HashMap<java.lang.String,java.lang.Object> cssParams,
GraphicStroke graphicStroke,
GraphicFill graphicFill)
Constructs a new Stroke. |
Method Summary | |
---|---|
java.lang.String |
exportAsXML()
exports the content of the Stroke as XML formated String |
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. |
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.graphics.sld.Drawing |
---|
addCssParameter, getCssParameters, getGraphicFill, removeCssParameter, setCssParameters, setGraphicFill |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LJ_MITRE
public static final int LJ_ROUND
public static final int LJ_BEVEL
public static final int LC_BUTT
public static final int LC_ROUND
public static final int LC_SQUARE
public static final java.awt.Color COLOR_DEFAULT
public static final double OPACITY_DEFAULT
public static final double WIDTH_DEFAULT
public static final int LJ_DEFAULT
public static final int LC_DEFAULT
Constructor Detail |
---|
protected Stroke()
public Stroke(java.util.HashMap<java.lang.String,java.lang.Object> cssParams, GraphicStroke graphicStroke, GraphicFill graphicFill)
cssParams
- keys are Strings (see above), values are CssParametersgraphicStroke
- graphicFill
- Method Detail |
---|
public GraphicStroke getGraphicStroke()
public void setGraphicStroke(GraphicStroke graphicStroke)
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
feature
- specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setOpacity(double opacity)
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
feature
- specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setLineJoin(int lineJoin)
public int getLineCap(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setLineCap(int lineCap)
public float[] getDashArray(Feature feature) throws FilterEvaluationException
feature
- the encoded pattern
FilterEvaluationException
- if the eevaluation fails or the encoded pattern is erroneouspublic void setDashArray(float[] dashArray)
public float getDashOffset(Feature feature) throws FilterEvaluationException
feature
- specifies the Feature to be used for evaluation of the underlying 'sld:ParameterValueType'
FilterEvaluationException
- if the evaluation failspublic void setDashOffset(float dashOffset)
dashOffset
- the dashOffset to be set for the Strokepublic java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org