A polygonal edge style for use in WebGL2 rendering.
Remarks
This style connects the bends of an edge with straight-line segments.
Note that unlike other IEdgeStyle implementations, this class is immutable. All properties are read-only and immutable, and the class cannot be subclassed, either.
Type Details
- yFiles module
- view
See Also
Constructors
WebGLPolylineEdgeStyle
(stroke?: WebGLStroke, sourceArrow?: WebGLArrowType, targetArrow?: WebGLArrowType, selfLoopDistance?: number, smoothingLength?: number, effect?: WebGLEffect, orthogonalEditing?: boolean)Creates a new polyline edge style that is rendered with WebGL.
Remarks
This style can be applied to edges that are rendered by the WebGLGraphModelManager. The preferred way of calling the constructor is using option arguments, as there are many defaults and optional arguments.
To use the default value for a color option, set it to null
.
Parameters
A map of options to pass to the method.
- stroke - WebGLStroke
- The color and thickness of the edge. Defaults to BLACK.
- sourceArrow - WebGLArrowType
- The arrow at the edge's source end. Defaults to NONE.
- targetArrow - WebGLArrowType
- The arrow at the edge's target end. Defaults to NONE.
- selfLoopDistance - number
- The distance between the node's layout and its self-loop control points. Defaults to
20
. - smoothingLength - number
- The smoothing length used to create smooth bends. A value of
0
will disable smoothing. The default value is0
. - effect - WebGLEffect
- The effect around the edge. Defaults to NONE.
- orthogonalEditing - boolean
- Whether edges using this style should be created or edited orthogonally. Defaults to
false
.
Properties
Gets the applied effects on this style.
Gets the renderer implementation that can be queried for implementations that provide details about the visual appearance and visual behavior for a given edge and this style instance.
Remarks
const creator = style.renderer.getVisualCreator(edge, style)
const visual = creator.createVisual(context)
Implements
Gets the arrow at the edge's source end.
Gets the stroke that specifies the color and thickness of the edge.
Gets the arrow at the edge's target end.
Methods
Create a clone of this object.