Interface Stroke
- 
- All Known Implementing Classes:
- Stroke.ConstantStroke,- StrokeImpl
 
 public interface StrokeContains all the information needed to draw styled lines. Stroke objects are contained byLineSymbolizers andPolygonSymbolizers. There are three basic types of strokes: solid-color,GraphicFill(stipple), and repeated linearGraphicStroke. A repeated linear graphic is plotted linearly and has its graphic symbol bent around the curves of the line string, and a graphic fill has the pixels of the line rendered with a repeating area-fill pattern. If neither aGraphicFillnorGraphicStrokeelement is given, then the line symbolizer will render a solid color.- Since:
- GeoAPI 2.2
- Author:
- Open Geospatial Consortium, Johann Sorel (Geomatys), Chris Dillard (SYS Technologies)
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classStroke.ConstantStroke
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Objectaccept(TraversingStyleVisitor visitor, Object extraData)calls the visit method of a StyleVisitorList<Expression>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.ExpressiongetColor()Indicates the color of the line if it is to be solid-color filled.float[]getDashArray()If present, indicates the dash pattern as a space-separated sequence of floating point numbers.ExpressiongetDashOffset()A dash array need not start from the beginning.GraphicgetGraphicFill()This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.GraphicgetGraphicStroke()This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use.ExpressiongetLineCap()This parameter controls how line strings should be capped.ExpressiongetLineJoin()This parameter controls how line strings should be joined together.ExpressiongetOpacity()Indicates the level of translucency as a floating point number whose value is between 0.0 and 1.0 (inclusive).ExpressiongetWidth()Gives the absolute width in uoms of the line stroke as a floating point number.voidsetColor(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.voidsetDashArray(float[] dashArray)Shortcut to define dash array using literal numbers.voidsetDashArray(List<Expression> dashArray)This parameter encodes the dash pattern as a list of expressions.
 The first expression 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.voidsetDashOffset(Expression dashOffset)A dash array need not start from the beginning.voidsetGraphicFill(Graphic graphicFill)This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.voidsetGraphicStroke(Graphic graphicStroke)This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use.voidsetLineCap(Expression lineCap)This parameter controls how line strings should be capped.voidsetLineJoin(Expression lineJoin)This parameter controls how line strings should be joined together.voidsetOpacity(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.voidsetWidth(Expression width)This parameter gives the absolute width (thickness) of a stroke in pixels encoded as a float.
 
- 
- 
- 
Method Detail- 
setDashOffsetvoid setDashOffset(Expression dashOffset) A dash array need not start from the beginning. This method allows for an offset into the dash array before starting it.
 - 
getGraphicFillGraphic getGraphicFill() This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.- Returns:
- The graphic to use as a stipple fill. If null, then no Stipple fill should be used.
 
 - 
setGraphicFillvoid setGraphicFill(Graphic graphicFill) This parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.
 - 
getGraphicStrokeGraphic getGraphicStroke() This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use.Proper stroking with a linear graphic requires two "hot-spot" points within the space of the graphic to indicate where the rendering line starts and stops. In the case of raster images with no special mark-up, this line will be assumed to be the middle pixel row of the image, starting from the first pixel column and ending at the last pixel column. - Returns:
- The graphic to use as a linear graphic. If null, then no graphic stroke should be used.
 
 - 
getColorExpression getColor() Indicates the color of the line if it is to be solid-color filled. The format of color values is"#rrggbb"whererr,gg, andbb, are red, green, and blue intensity values, respectively, represented as two digit hexadecimal integers. The hexadecimal digits betweenAandFmay be in either uppercase or lowercase. If null, the default color is"#000000", black.- Returns:
- Expression
 
 - 
getOpacityExpression getOpacity() Indicates the level of translucency as a floating point number whose value is between 0.0 and 1.0 (inclusive). A value of zero means completely transparent. A value of 1.0 means completely opaque. If null, the default value is 1.0, totally opaque.- Returns:
- expression
 
 - 
getWidthExpression getWidth() Gives the absolute width in uoms of the line stroke as a floating point number. Fractional numbers are allowed (with system-dependent interpretation), but negative numbers are not. If null, the default value is 1.0.- Returns:
- expression
 
 - 
setColorvoid setColor(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. The hexidecimal digits between A and F may be in either upper or lower case. For example, full red is encoded as "#ff0000" (with no quotation marks).Note: in CSS this parameter is just called Stroke and not Color. 
 - 
setWidthvoid setWidth(Expression width) This parameter gives the absolute width (thickness) of a stroke in pixels encoded as a float. Fractional numbers are allowed but negative numbers are not.
 - 
setOpacityvoid setOpacity(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. A linear scale of translucency is used for intermediate values.
 For example, "0.65" would represent 65% opacity.
 - 
getLineJoinExpression getLineJoin() This parameter controls how line strings should be joined together.
 - 
setLineJoinvoid setLineJoin(Expression lineJoin) This parameter controls how line strings should be joined together.
 - 
getLineCapExpression getLineCap() This parameter controls how line strings should be capped.
 - 
getDashArrayfloat[] getDashArray() If present, indicates the dash pattern as a space-separated sequence of floating point numbers. The first number represents the length of the first dash to draw. The second number represents the length of space to leave. This continues to the end of the list then repeats. If the list contains an odd number of values, then before rendering the list is enlarged by repeating the last value. If this parameter is omitted, lines will be drawn as solid and unbroken.- Returns:
- expression
 
 - 
setLineCapvoid setLineCap(Expression lineCap) This parameter controls how line strings should be capped.
 - 
setDashArrayvoid setDashArray(float[] dashArray) Shortcut to define dash array using literal numbers.
 - 
dashArrayList<Expression> 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.For example, "2 1 3 2" would produce: 
 -- --- -- --- -- --- -- --- -- --- --
 - 
setDashArrayvoid setDashArray(List<Expression> dashArray) This parameter encodes the dash pattern as a list of expressions.
 The first expression 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.For example, "2 1 3 2" would produce: 
 -- --- -- --- -- --- -- --- -- --- --
 - 
getDashOffsetExpression getDashOffset() A dash array need not start from the beginning. This method allows for an offset into the dash array before starting it.
 - 
acceptObject accept(TraversingStyleVisitor visitor, Object extraData) calls the visit method of a StyleVisitor- Parameters:
- visitor- the style visitor
 
 - 
setGraphicStrokevoid setGraphicStroke(Graphic graphicStroke) This parameter indicates that a repeated-linear-graphic graphic stroke type will be used and specifies the graphic to use.Proper stroking with a linear graphic requires two "hot-spot" points within the space of the graphic to indicate where the rendering line starts and stops. In the case of raster images with no special mark-up, this line will be assumed to be the middle pixel row of the image, starting from the first pixel column and ending at the last pixel column. 
 - 
acceptvoid accept(StyleVisitor visitor) 
 
- 
 
-