An icon label style for use in WebGL2 rendering.
Remarks
Type Details
- yFiles module
- view
See Also
Constructors
WebGLIconLabelStyle
(icon: ImageData, iconColor?: Color, backgroundColor?: Color, backgroundStroke?: WebGLStroke, padding?: Insets, backgroundShape?: WebGLLabelShape, effect?: WebGLEffect, textureRendering?: WebGLTextureRendering)Creates a new icon label style that is rendered with WebGL2.
Remarks
This style can be applied to labels 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.
- icon - ImageData
- The mandatory image data for the icon to be used for the label.
- iconColor - Color
- The fill color of the icon, or
null
. If this parameter isnull
, the original color of the icon is used. Otherwise the alpha values of the icon will be combined with the color values from this value. Defaults tonull
. - backgroundColor - Color
- The color of the label's background. Defaults to TRANSPARENT, which does not render a background.
- backgroundStroke - WebGLStroke
- The color of the label's background border. Defaults to NONE, which does not render a stroke.
- padding - Insets
- The padding of the text within the label's bounds. Defaults to empty insets.
- backgroundShape - WebGLLabelShape
- The shape of the label's background. Defaults to RECTANGLE.
- effect - WebGLEffect
- The effect around the label. Defaults to NONE.
- textureRendering - WebGLTextureRendering
- Rendering hint on how to resolve blurriness of icon images at large zoom levels. Defaults to INTERPOLATED. We recommend not using SDF for images that contain gradients.
Properties
Gets the fill color for the background of the shape.
Gets the shape of the label's background.
Remarks
Gets the color of the stroke around the shape.
Gets the set of applied effects on this style.
Gets the padding of the text within the label's bounds.
Gets the renderer implementation that can be queried for implementations that provide details about the visual appearance and visual behavior for a given label and this style instance.
Remarks
const creator = style.renderer.getVisualCreator(label, style)
const visual = creator.createVisual(context)
Implements
Gets the rendering hint on how to resolve blurriness of icon images on large zoom values.
Remarks
Methods
Create a clone of this object.