Namespace: Rendering
Rendering
Classes
Namespaces
Type Definitions
BlendMode
Enum of ink composite operations
Properties:
Name | Type | Description |
---|---|---|
SOURCE_OVER | string | This is the default setting and draws new shapes on top of the existing canvas content. Also known as NORMAL. |
DESTINATION_OVER | string | New shapes are drawn behind the existing canvas content. Also known as NORMAL_REVERSE. |
DESTINATION_OUT | string | The existing content is kept where it doesn't overlap the new shape. Also known as ERASE. |
LIGHTER | string | Where both shapes overlap the color is determined by adding color values. Also known as ADD. |
COPY | string | Only the new shape is shown. Also known as NONE. |
MIN | string | The result is the minimum of both color. The result is a darker color. Supported for WebGL rendering only. |
MAX | string | The result is the maximum of both color. The result is a lighter color. Supported for WebGL rendering only. |
DIRECT_SOURCE_OUT | string | Subtract the destination color components from the drawn color components. Also known as SUBTRACT. |
DIRECT_DESTINATION_OUT | string | Subtract the drawn color components from the destination color components. Also known as SUBTRACT_REVERSE. |
BlendOptions
Defines blend method options
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
mode | Rendering.BlendMode | <optional> | SOURCE_OVER | Blending mode |
destinationPosition | Common.Point | <optional> | point(0, 0) | The coordinate in the destination canvas at which to place the top-left corner of the source image |
rect | Common.Rect | <optional> | source layer bounds | Source area for read and destination area for write (sourceRect == destinationRect) |
sourceRect | Common.Rect | Source layer area to read, required with destinationRect | ||
destinationRect | Common.Rect | Destination layer area where to be drawn source layer readed data, required with sourceRect | ||
clipRect | Common.Rect | Blending is limited to this rect | ||
transform | Common.Matrix | Transformation to be applied, rects are not applicable when available |
ComposeStyle
Defines composition style
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color | Common.Color | Composition color | ||
backgroundColor | Common.Color | <optional> | TRANSPERENT | Composite background color |
blendMode | Rendering.BlendMode | Layer blend mode, indicates how data should be blended | ||
brush | Rendering.Brush | |||
randomSeed | long | <optional> | NaN | Positive number, applicable only for BrushGL |
InkCanvas
Defines ink canvas
Type:
OffscreenLayer
Defines Rendering offscreen layer