Skip to main content

Namespace: Rendering

Rendering

Classes

Brush

InkStyle

Layer

StrokeRenderer

Namespaces

2D

WebGL

Type Definitions

BlendMode

Enum of ink composite operations

Properties:
NameTypeDescription
SOURCE_OVERstringThis is the default setting and draws new shapes on top of the existing canvas content. Also known as NORMAL.
DESTINATION_OVERstringNew shapes are drawn behind the existing canvas content. Also known as NORMAL_REVERSE.
DESTINATION_OUTstringThe existing content is kept where it doesn't overlap the new shape. Also known as ERASE.
LIGHTERstringWhere both shapes overlap the color is determined by adding color values. Also known as ADD.
COPYstringOnly the new shape is shown. Also known as NONE.
MINstringThe result is the minimum of both color. The result is a darker color. Supported for WebGL rendering only.
MAXstringThe result is the maximum of both color. The result is a lighter color. Supported for WebGL rendering only.
DIRECT_SOURCE_OUTstringSubtract the destination color components from the drawn color components. Also known as SUBTRACT.
DIRECT_DESTINATION_OUTstringSubtract the drawn color components from the destination color components. Also known as SUBTRACT_REVERSE.

BlendOptions

Defines blend method options

Properties:
NameTypeAttributesDefaultDescription
modeRendering.BlendMode<optional>SOURCE_OVERBlending mode
destinationPositionCommon.Point<optional>point(0, 0)The coordinate in the destination canvas at which to place the top-left corner of the source image
rectCommon.Rect<optional>source layer boundsSource area for read and destination area for write (sourceRect == destinationRect)
sourceRectCommon.RectSource layer area to read, required with destinationRect
destinationRectCommon.RectDestination layer area where to be drawn source layer readed data, required with sourceRect
clipRectCommon.RectBlending is limited to this rect
transformCommon.MatrixTransformation to be applied, rects are not applicable when available

ComposeStyle

Defines composition style

Properties:
NameTypeAttributesDefaultDescription
colorCommon.ColorComposition color
backgroundColorCommon.Color<optional>TRANSPERENTComposite background color
blendModeRendering.BlendModeLayer blend mode, indicates how data should be blended
brushRendering.Brush
randomSeedlong<optional>NaNPositive number, applicable only for BrushGL

InkCanvas

Defines ink canvas

Type:

OffscreenLayer

Defines Rendering offscreen layer

Type:

Home