RectangleCanvasDrawable¶
Overview¶
Canvas drawable for Rectangle nodes.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RectangleCanvasDrawable¶
Instance Methods¶
writeRectangularPath( context, node )¶
Convenience function for drawing a rectangular path (with our Rectangle node's parameters) to the Canvas context. @private
@param {CanvasRenderingContext2D} context - To execute drawing commands on. @param {Node} node - The node whose rectangle we want to draw
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.
markDirtyRectangle()¶
markDirtyX()¶
markDirtyY()¶
markDirtyWidth()¶
markDirtyHeight()¶
markDirtyCornerXRadius()¶
markDirtyCornerYRadius()¶
Source Code¶
See the source for RectangleCanvasDrawable.js in the scenery repository.