Interface Stroke


  • @XmlElement("Stroke")
    public interface Stroke
    Contains all the information needed to draw styled lines. Stroke objects are contained by LineSymbolizer and PolygonSymbolizer. There are three basic types of strokes: solid-color, GraphicFill (stipple), and repeated linear GraphicStroke. 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 a GraphicFill nor GraphicStroke element is given, then the line symbolizer will render a solid color.
    Since:
    GeoAPI 2.2
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Object accept​(StyleVisitor visitor, Object extraData)
      calls the visit method of a StyleVisitor
      Expression getColor()
      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.
      Expression getDashOffset()
      Indicates the distance offset into the dash array to begin drawing.
      GraphicFill getGraphicFill()
      If non-null, indicates that line should be drawn by tiling the (thin) area of the line with the given graphic.
      GraphicStroke getGraphicStroke()
      If non-null, indicates that lines should be drawn by repeatedly plotting the given graphic along the path of the lines, rotating it according to the orientation of the line.
      Expression getLineCap()
      Indicates how the beginning and ending segments of a line string will be terminated.
      Expression getLineJoin()
      Indicates how the various segments of a (thick) line string should be joined.
      Expression getOpacity()
      Indicates the level of translucency as a floating point number whose value is between 0.0 and 1.0 (inclusive).
      Expression getWidth()
      Gives the absolute width in uoms of the line stroke as a floating point number.
    • Method Detail

      • getGraphicFill

        @XmlElement("GraphicFill")
        GraphicFill getGraphicFill()
        If non-null, indicates that line should be drawn by tiling the (thin) area of the line with the given graphic. Between getGraphicFill() and getGraphicStroke(), only one may return a non-null value since a Stroke can have a GraphicFill or a GraphicStroke, but not both.
      • getGraphicStroke

        @XmlElement("GraphicStroke")
        GraphicStroke getGraphicStroke()
        If non-null, indicates that lines should be drawn by repeatedly plotting the given graphic along the path of the lines, rotating it according to the orientation of the line. Between getGraphicFill() and getGraphicStroke, only one may return a non-null value since a Stroke can have a GraphicFill or a GraphicStroke, but not both.
      • getColor

        @XmlParameter("stroke")
        Expression getColor()
        Indicates the color of the line if it is to be solid-color filled. The format of color values is "#rrggbb" where rr, gg, and bb, are red, green, and blue intensity values, respectively, represented as two digit hexadecimal integers. The hexadecimal digits between A and F may be in either uppercase or lowercase. If null, the default color is "#000000", black.
      • getOpacity

        @XmlParameter("stroke-opacity")
        Expression 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.
      • getWidth

        @XmlParameter("stroke-width")
        Expression 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.
      • getLineJoin

        @XmlParameter("stroke-linejoin")
        Expression getLineJoin()
        Indicates how the various segments of a (thick) line string should be joined. Valid values are "miter", "round", and "bevel". If null, the default value is system dependent (probably whichever one is fastest to render).
      • getLineCap

        @XmlParameter("stroke-linecap")
        Expression getLineCap()
        Indicates how the beginning and ending segments of a line string will be terminated. Valid values are "butt", "round", and "square". If null, the default value is system dependent.
      • getDashArray

        @XmlParameter("stroke-dasharray")
        float[] 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.
      • getDashOffset

        @XmlParameter("stroke-dashoffset")
        Expression getDashOffset()
        Indicates the distance offset into the dash array to begin drawing. If null, the default value is zero.
      • accept

        Object accept​(StyleVisitor visitor,
                      Object extraData)
        calls the visit method of a StyleVisitor
        Parameters:
        visitor - the style visitor