A node style for geometric shapes for use in WebGL2 rendering.
Implements
- I
- I
Remarks
Note that unlike other INodeStyle implementations, this class is immutable. All properties are read-only and immutable, and the class cannot be subclassed, either.
See Also
Developer's Guide
API
- WebGLImageNodeStyle, WebGLGroupNodeStyle
Members
No filters for this type
Constructors
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
- 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 set of applied effects on this style.
readonlyfinal
Gets the fill color for the shape background.
Gets the fill color for the shape background.
readonlyfinal
The default value is
false.readonlyfinal
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.
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.
The idiom for retrieving, e.g. an IVisualCreator implementation for a given style is:
const creator = style.renderer.getVisualCreator(node, style)
const visual = creator.createVisual(context)readonlyfinal
Implements
INodeStyle.rendererGets the shape of the style.
Gets the shape of the style.
readonlyfinal
Gets the stroke around the shape.
Gets the stroke around the shape.
readonlyfinal
Methods
Create a clone of this object.
Create a clone of this object.