Optionalcanvas: HTMLCanvasElementOptionalvideo: HTMLVideoElementOptionalonDestroy: () => voidReadonlycanvasReadonlyrendererOptional ReadonlyvideoDraw a sub-renderer's content onto this renderer.
The source image is read from image.canvas.
Optionalwidth: numberOptionalheight: numberExecute all buffered draw commands.
Ordering contract: GPU-accelerated commands (drawImage, fillRect, strokeRect) are rendered first, then Canvas 2D helper operations (text/path) are composited on top. Callers must ensure fillText/strokeText are issued AFTER all drawImage calls within a single frame.
Measure text on a dedicated detached canvas, so WKWebView resolves fonts like the offscreen render canvas instead of the connected main canvas.
The drawScale transform is still applied to mirror render-time state and
keep cache keys distinct, but the WKWebView mismatch observed for #323 is
caused by connected-vs-detached canvas font matching, not by the transform.
Optionalarg1: number
Canvasを使ったレンダラー dom/canvas周りのAPIを切り出したもの
Param: canvas
レンダリング先のCanvas
Param: video
レンダリングするVideo(任意)