Package org.geotools.api.style
Class Stroke.ConstantStroke
Object
ConstantStroke
- All Implemented Interfaces:
Stroke
- Enclosing interface:
- Stroke
-
Nested Class Summary
Nested classes/interfaces inherited from interface Stroke
Stroke.ConstantStroke -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(StyleVisitor visitor) accept(TraversingStyleVisitor visitor, Object data) calls the visit method of a StyleVisitorvoidsetColor(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.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Stroke
dashArray, getColor, getDashArray, getDashOffset, getGraphicFill, getGraphicStroke, getLineCap, getLineJoin, getOpacity, getWidth
-
Constructor Details
-
ConstantStroke
public ConstantStroke()
-
-
Method Details
-
setColor
Description copied from interface:StrokeThis 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.
-
setWidth
Description copied from interface:StrokeThis parameter gives the absolute width (thickness) of a stroke in pixels encoded as a float. Fractional numbers are allowed but negative numbers are not. -
setOpacity
Description copied from interface:StrokeThis 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.- Specified by:
setOpacityin interfaceStroke
-
setLineJoin
Description copied from interface:StrokeThis parameter controls how line strings should be joined together.- Specified by:
setLineJoinin interfaceStroke
-
setLineCap
Description copied from interface:StrokeThis parameter controls how line strings should be capped.- Specified by:
setLineCapin interfaceStroke
-
setDashArray
public void setDashArray(float[] dashArray) Description copied from interface:StrokeShortcut to define dash array using literal numbers.- Specified by:
setDashArrayin interfaceStroke
-
setDashArray
Description copied from interface:StrokeThis 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:
-- --- -- --- -- --- -- --- -- --- --- Specified by:
setDashArrayin interfaceStroke
-
setDashOffset
Description copied from interface:StrokeA dash array need not start from the beginning. This method allows for an offset into the dash array before starting it.- Specified by:
setDashOffsetin interfaceStroke
-
setGraphicFill
Description copied from interface:StrokeThis parameter indicates that a stipple-fill repeated graphic will be used and specifies the fill graphic to use.- Specified by:
setGraphicFillin interfaceStroke
-
setGraphicStroke
Description copied from interface:StrokeThis 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.
- Specified by:
setGraphicStrokein interfaceStroke
-
accept
-
accept
Description copied from interface:Strokecalls the visit method of a StyleVisitor
-