Class: StrokeRendererGL
Rendering.WebGL.StrokeRendererGL(canvas, optionsopt)
Stroke painter
Constructor
new StrokeRendererGL(canvas, optionsopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
canvas | Rendering.WebGL.InkCanvasGL | view layer | |
options | Rendering.WebGL.InkLayerOptions | <optional> | Layer configuration. When not available underlying layer is auto created with default size (device screen size). |
Properties:
| Name | Type | Description |
|---|---|---|
brush | Rendering.WebGL.BrushGL | Rendering brush |
color | Common.Color | Rendering color |
updatedArea | Common.Rect | Current modified segments area |
preliminaryArea | Common.Rect | Last preliminary update area |
strokeBounds | Common.Rect | Current stroke area |
affectedArea | Common.Rect | Runtime graphics updates area for drawn segments + preliminary area |
Since:
- version 1.0
Extends
Methods
abort()
Restarts StrokeRenderer instance lifecycle for next usage
Overrides:
blendStroke(layeropt, dirtyAreaopt, blendModeopt)
Blends completed stroke with another layer
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
layer | Rendering.WebGL.OffscreenLayerGL | <optional> | this.canvas | Target layer for stroke blending |
dirtyArea | Common.Rect | <optional> | this.strokeBounds | Blending area |
blendMode | Rendering.BlendMode | <optional> | this.blendMode | Blending mode |
Overrides:
(async) blendStroke2D(layer, blendOptions)
Blends completed stroke with 2D layer
Parameters:
| Name | Type | Description |
|---|---|---|
layer | Rendering.2D.OffscreenLayer2D | Target layer for stroke blending |
blendOptions | Rendering.BlendOptions | Blending configuration |