|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Stroke
The Stroke object encapsulates the graphical-symbolization parameters for linear geometries.
There are three basic types of stroke: solid color, graphic fill (stipple), and repeated linear graphic stroke. A repeated linear graphic is plotted linearly and has its graphic symbol bent around the curves of the line string. A GraphicFill has the pixels of the line rendered with a repeating area-fill pattern.
If neither a graphic fill nor graphic stroke element are given, then the line symbolizer should render a solid color.
The details of this object are taken from the OGC Styled-Layer Descriptor Report (OGC 02-070) version 1.0.0.:
<xsd:element name="Stroke">
<xsd:annotation>
<xsd:documentation>
A "Stroke" specifies the appearance of a linear geometry. It is
defined in parallel with SVG strokes. The following CssParameters
may be used: "stroke" (color), "stroke-opacity", "stroke-width",
"stroke-linejoin", "stroke-linecap", "stroke-dasharray", and
"stroke-dashoffset".
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:choice minOccurs="0">
<xsd:element ref="sld:GraphicFill"/>
<xsd:element ref="sld:GraphicStroke"/>
</xsd:choice>
<xsd:element ref="sld:CssParameter" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Renderers can use this information when displaying styled features, though it must be remembered that not all renderers will be able to fully represent strokes as set out by this interface. For example, opacity may not be supported.
Notes:
Field Summary | |
---|---|
static Stroke |
DEFAULT
Default Stroke capturing the defaults indicated by the standard. |
static Stroke |
NULL
Null Stroke capturing the defaults indicated by the standard. |
Method Summary | |
---|---|
void |
accept(StyleVisitor visitor)
|
java.awt.Color |
getColor(org.opengis.feature.simple.SimpleFeature f)
Deprecated. |
float[] |
getDashArray()
This parameter encodes the dash pattern as a seqeuence of floats. The first number gives the length in pixels of the dash to draw, the second gives the amount of space to leave, and this pattern repeats. If an odd number of values is given, then the pattern is expanded by repeating it twice to give an even number of values. |
org.opengis.filter.expression.Expression |
getDashOffset()
A dash array need not start from the beginning. |
Graphic |
getGraphicFill()
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use. |
Graphic |
getGraphicStroke()
This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use. |
org.opengis.filter.expression.Expression |
getLineCap()
This parameter controls how line strings should be capped. |
org.opengis.filter.expression.Expression |
getLineJoin()
This parameter controls how line strings should be joined together. |
void |
setColor(org.opengis.filter.expression.Expression color)
This parameter gives the solid color that will be used for a stroke. The color value is RGB-encoded using two hexidecimal digits per primary-color component in the order Red, Green, Blue, prefixed wih the hash (#) sign. |
void |
setDashArray(float[] dashArray)
This parameter encodes the dash pattern as a seqeuence of floats. The first number gives the length in pixels of the dash to draw, the second gives the amount of space to leave, and this pattern repeats. If an odd number of values is given, then the pattern is expanded by repeating it twice to give an even number of values. |
void |
setDashOffset(org.opengis.filter.expression.Expression dashOffset)
A dash array need not start from the beginning. |
void |
setGraphicFill(org.opengis.style.Graphic graphicFill)
This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use. |
void |
setGraphicStroke(org.opengis.style.Graphic graphicStroke)
This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use. |
void |
setLineCap(org.opengis.filter.expression.Expression lineCap)
This parameter controls how line strings should be capped. |
void |
setLineJoin(org.opengis.filter.expression.Expression lineJoin)
This parameter controls how line strings should be joined together. |
void |
setOpacity(org.opengis.filter.expression.Expression opacity)
This specifies the level of translucency to use when rendering the stroke. The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque. |
void |
setWidth(org.opengis.filter.expression.Expression width)
This parameter gives the absolute width (thickness) of a stroke in pixels encoded as a float. |
Methods inherited from interface org.opengis.style.Stroke |
---|
accept, getColor, getOpacity, getWidth |
Field Detail |
---|
static final Stroke DEFAULT
For some attributes the standard does not define a default, so a reasonable value is supplied.
static final Stroke NULL
This is a NullObject, it purpose is to prevent client code from having to do null checking.
Method Detail |
---|
@Deprecated java.awt.Color getColor(org.opengis.feature.simple.SimpleFeature f)
void setColor(org.opengis.filter.expression.Expression color)
void setWidth(org.opengis.filter.expression.Expression width)
void setOpacity(org.opengis.filter.expression.Expression opacity)
org.opengis.filter.expression.Expression getLineJoin()
getLineJoin
in interface org.opengis.style.Stroke
void setLineJoin(org.opengis.filter.expression.Expression lineJoin)
org.opengis.filter.expression.Expression getLineCap()
getLineCap
in interface org.opengis.style.Stroke
void setLineCap(org.opengis.filter.expression.Expression lineCap)
float[] getDashArray()
-- --- -- --- -- ---
-- --- -- --- --
getDashArray
in interface org.opengis.style.Stroke
void setDashArray(float[] dashArray)
-- --- -- --- -- ---
-- --- -- --- --
org.opengis.filter.expression.Expression getDashOffset()
getDashOffset
in interface org.opengis.style.Stroke
void setDashOffset(org.opengis.filter.expression.Expression dashOffset)
Graphic getGraphicFill()
getGraphicFill
in interface org.opengis.style.Stroke
void setGraphicFill(org.opengis.style.Graphic graphicFill)
Graphic getGraphicStroke()
getGraphicStroke
in interface org.opengis.style.Stroke
void setGraphicStroke(org.opengis.style.Graphic graphicStroke)
void accept(StyleVisitor visitor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |