A node style for geometric shapes for use in WebGL2 rendering.
Remarks
Type Details
- yFiles module
- view
See Also
Constructors
WebGLShapeNodeStyle
(shape?: WebGLShapeNodeShape, fill?: Color, stroke?: WebGLStroke, effect?: WebGLEffect, keepIntrinsicAspectRatio?: boolean)Creates a new shape node style that is rendered with WebGL2.
Remarks
This style can be applied to nodes 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.
- shape - WebGLShapeNodeShape
- The shape of the node. Defaults to ELLIPSE.
- fill - Color
- The background color of the node. Defaults to WHITE.
- stroke - WebGLStroke
- The border color of the node. Defaults to BLACK.
- effect - WebGLEffect
- The effect around the node. Defaults to NONE.
- keepIntrinsicAspectRatio - boolean
- Whether to keep the intrinsic aspect ratio of the shape.
Properties
Gets the set of applied effects on this style.
Gets the fill color for the shape background.
Gets the renderer implementation that can be queried for implementations that provide details about the visual appearance and visual behavior for a given node and this style instance.
Remarks
const creator = style.renderer.getVisualCreator(node, style)
const visual = creator.createVisual(context)
Implements
Gets the shape of the style.
Gets the stroke around the shape.
Methods
Create a clone of this object.