C

WebGLShapePortStyle

A port style for geometric shapes for use in WebGL2 rendering.
Inheritance Hierarchy

Remarks

Note that unlike other IPortStyle implementations, this class is immutable. All properties are read-only and immutable, and the class cannot be subclassed, either.

Members

No filters for this type

Constructors

Creates a new shape port style that is rendered with WebGL2.

This style can be applied to ports 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
conversion
The shape of the port. Defaults to WebGLShapeNodeShape.ELLIPSE.
fill?: Color
conversion
The background color of the port. Defaults to Color.WHITE.
stroke?: WebGLStroke
conversion
The border color of the port. Defaults to Color.BLACK.
effect?: WebGLEffect
conversion
The effect around the port. Defaults to WebGLEffect.NONE.
renderSize?: Size
conversion
The size of the port's visualization.
offset?: Point
conversion
The offset for the port visualization.
keepIntrinsicAspectRatio?: boolean
Whether to keep the intrinsic aspect ratio of the shape.
zoomVisibilityPolicy?: WebGLZoomVisibilityPolicy
The zoom visibility policy. Defaults to null.

Properties

Gets the set of applied effects on this style.
readonlyfinal
Gets the fill color for the shape background.
readonlyfinal
Gets a value indicating whether to keep the intrinsic aspect ratio of the shape.
The default value is false.
readonlyfinal
Gets the offset for the port visualization.

This will cause the visualization to be shifted by the given amount. This can be used to have a port visualization that is not centered on the port's location, e.g., to get a port visualization that extends outside the node, while the port lies on the node outline.

The default value is (0,0).

readonlyfinal
Gets the renderer implementation that can be queried for implementations that provide details about the visual appearance and visual behavior for a given port and this style instance.
The idiom for retrieving, e.g. an IVisualCreator implementation for a given style is:
const creator = style.renderer.getVisualCreator(port, style)
const visual = creator.createVisual(context)
readonlyfinal
Gets the size of the port's visualization.

Unlike nodes, ports have no intrinsic size, so a suitable size for the visualization has to be given here.

The default value is (5,5).

readonlyfinal
Gets the shape of the style.
readonlyfinal
Gets the stroke around the shape.
readonlyfinal
Gets the zoom visibility policy or null if no policy is set.
readonlyfinal

Methods

Create a clone of this object.
final

Return Value

Object
A clone of this object.