TX Sheet Control

paintScene Function

Function

Public function for paintScene.

Package: @txtextcontrol/tx-sheet-control. Version: 2.0.0.

ES module import: import { paintScene } from '@txtextcontrol/tx-sheet-control';.

Syntax

paintScene(drawingContext: CanvasRenderingContext2D, scene: PageScene, images?: Map<string, CanvasImageSource>): void

Parameters

ParameterTypeOptionalDescription
drawingContextCanvasRenderingContext2DNoValue matching drawingContext's declared type and the owning object's validation rules.
scenePageSceneNoValue matching scene's declared type and the owning object's validation rules.
imagesMap<string, CanvasImageSource> | undefinedYesValue matching images's declared type and the owning object's validation rules.

Return Value

void.

Examples

Use this public value with the application package shown below. File and font inputs are application-owned resources, not automatically downloaded product data.

import { paintScene } from '@txtextcontrol/tx-sheet-control';

function usePaintScene(drawingContext: CanvasRenderingContext2D) {
    const result = paintScene(drawingContext, { width: 640, height: 360, number: 2, commands: [] });
    console.log(result);
}

See Also