Skip to content

ImageCanvasDrawable

Overview

Canvas drawable for Image nodes.

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class ImageCanvasDrawable

import { ImageCanvasDrawable } from 'scenerystack/scenery';

Instance Methods

paintCanvas( wrapper, node, matrix )

Paints this drawable to a Canvas (the wrapper contains both a Canvas reference and its drawing context). @public

Assumes that the Canvas's context is already in the proper local coordinate frame for the node, and that any other required effects (opacity, clipping, etc.) have already been prepared.

This is part of the CanvasSelfDrawable API required to be implemented for subtypes.

@param {CanvasContextWrapper} wrapper - Contains the Canvas and its drawing context @param {scenery.Node} node - Our node that is being drawn @param {Matrix3} matrix - The transformation matrix applied for this node's coordinate system.

markDirtyImage()

@public

markDirtyMipmap()

@public

markDirtyImageOpacity()

@public

Source Code

See the source for ImageCanvasDrawable.js in the scenery repository.