A node style for geometric shapes for use in WebGL2 rendering.
Inheritance Hierarchy
WebGL2ShapeNodeStyle
Remarks
Note that unlike INodeStyle implementations, this class is immutable and can not be used with setStyle. All properties are read-only and immutable and the class cannot be subclassed, either. Its sole purpose is to be used with the setStyle method of WebGL2GraphModelManager.
Type Details
- yfiles module
- view-webgl
- yfiles-umd modules
- view-webgl, view
- Legacy UMD name
- yfiles.view.WebGL2ShapeNodeStyle
See Also
Constructors
WebGL2ShapeNodeStyle
(shape?: WebGL2ShapeNodeShape, fill?: Color, stroke?: WebGL2Stroke, effect?: WebGL2Effect, 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 WebGL2GraphModelManager. 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
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- shape - WebGL2ShapeNodeShape
- The shape of the node. Defaults to ELLIPSE.
- fill - Color
- The background color of the node. Defaults to WHITE.
- stroke - WebGL2Stroke
- The border color of the node. Defaults to BLACK.
- effect - WebGL2Effect
- 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 shape of the style.
Gets the stroke around the shape.