The style of dashing a Stroke defined by its dashes and offset.
All of these values are in terms of multiples of the thickness of a Stroke. This is different from the corresponding properties of a SVG stroke.
This is a convertible type that can be used with the following notation(s) in parameter lists, parameter objects or setters.
CSS border-style strings are converted to DashStyles. For example:
'solid'
'dash'
'dot'
'dash-dot'
'dash-dot-dot'
'5 10'
'5, 10'
It is also possible to specify an Array<Object> or number to define the pattern of dashes:
[5, 10]
10
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.DashStyle
Initializes a new instance of the DashStyle class using the provided dash pattern and offset.
options - Object
A map of options to pass to the method.
- dashes - number[]
The pattern of dashes and gaps.
- offset - number
The offset.
Initializes a new instance of the DashStyle class using an empty pattern for the dashes and an offset value of 0.0
.
Gets or sets the pattern of dashes and gaps.
Note that both an empty pattern as well as
null
result in a solid
Stroke.
Gets or sets the offset where the dash pattern starts.
Clones this instance by returning a memberwiseClone or this in case this instance is already frozen.
- ↪any
An instance of the same type as this instance.
Freezes and returns this instance.
Freezing an object makes it immutable, which can result in performance enhancements.
- ↪DashStyle
This instance, made immutable.
Determines if this instance is frozen.
Gets the dash style with a single dash.
This style is designed for dash caps that extend into the 'gaps' like
SQUARE and
ROUND. A pen with this style doesn't look as expected if its dash cap is
FLAT. Since
FLAT is the default value, you should explicitly set another value.
Gets the dash style with a single dash and dot.
This style is designed for dash caps that extend into the 'gaps' like
SQUARE and
ROUND. A pen with this style doesn't contain visible dots if its dash cap is
FLAT. Since
FLAT is the default value, you should explicitly set another value.
Gets the dash style with a single dash and two dots.
This style is designed for dash caps that extend into the 'gaps' like
SQUARE and
ROUND. A pen with this style doesn't contain visible dots if its dash cap is
FLAT. Since
FLAT is the default value, you should explicitly set another value.
Gets the dash style with a single dot.
This style is designed for dash caps that extend into the 'gaps' like
SQUARE and
ROUND. A pen with this style doesn't contain visible dots if its dash cap is
FLAT. Since
FLAT is the default value, you should explicitly set another value.
Gets the solid dash style with no dashes.
Creates a DashStyle instance from the given dash-like object by performing automatic type conversion.
options - Object
A map of options to pass to the method.
- dashLike - DashStyle
- ↪DashStyle
The given
dashLike
if it is already a
DashStyle, or a new instance initialized to the values found in
dashLike
.