new Stroke(opt_options)
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options.
|
Methods
-
Clones the style.
Returns:
The cloned style.
-
Get the stroke color.
Returns:
Color.
-
getLineCap(){CanvasLineCap|undefined}
style/Stroke.js, line 110 -
Get the line cap type for the stroke.
Returns:
Line cap.
-
getLineDash(){Array.<number>}
style/Stroke.js, line 119 -
Get the line dash style for the stroke.
Returns:
Line dash.
-
getLineDashOffset(){number|undefined}
style/Stroke.js, line 128 -
Get the line dash offset for the stroke.
Returns:
Line dash offset.
-
getLineJoin(){CanvasLineJoin|undefined}
style/Stroke.js, line 137 -
Get the line join type for the stroke.
Returns:
Line join.
-
getMiterLimit(){number|undefined}
style/Stroke.js, line 146 -
Get the miter limit for the stroke.
Returns:
Miter limit.
-
getWidth(){number|undefined}
style/Stroke.js, line 155 -
Get the stroke width.
Returns:
Width.
-
setColor(color)
style/Stroke.js, line 165 -
Set the color.
Name Type Description color
module:ol/color~Color | module:ol/colorlike~ColorLike Color.
-
setLineCap(lineCap)
style/Stroke.js, line 175 -
Set the line cap.
Name Type Description lineCap
CanvasLineCap | undefined Line cap.
-
setLineDash(lineDash)
style/Stroke.js, line 191 -
Set the line dash.
Please note that Internet Explorer 10 and lower do not support the
setLineDash
method on theCanvasRenderingContext2D
and therefore this property will have no visual effect in these browsers.Name Type Description lineDash
Array.<number> Line dash.
-
setLineDashOffset(lineDashOffset)
style/Stroke.js, line 201 -
Set the line dash offset.
Name Type Description lineDashOffset
number | undefined Line dash offset.
-
setLineJoin(lineJoin)
style/Stroke.js, line 211 -
Set the line join.
Name Type Description lineJoin
CanvasLineJoin | undefined Line join.
-
setMiterLimit(miterLimit)
style/Stroke.js, line 221 -
Set the miter limit.
Name Type Description miterLimit
number | undefined Miter limit.
-
setWidth(width)
style/Stroke.js, line 231 -
Set the width.
Name Type Description width
number | undefined Width.