AbstractConstructs a new canvas helper.
The canvas node to wrap.
Retrieves the height of the canvas.
The height of the canvas.
Retrieves the width of the canvas.
The width of the canvas.
AbstractclearClear the canvas with the given color.
The color to clear the canvas with.
AbstractrefreshRebuild rendering pipeline in reaction to a change in the canvas. Usually, when the canvas was resized.
AbstractrenderPresent a new frame. Not all implementations will need this.
AbstractrenderDraw FPS information onto the canvas.
Durations of previous frame draws.
The duration of the previous frame draw.
The time elapsed since the last frame.
AbstractupdateHandle any internal update calls that would be required to present a new frame. Not all implementations will need this.
The base class for canvas helpers, which also defines a common interface.
Derivates of the class might chose to leave implementations of individual methods empty, if it fits their pattern better. For example, one canvas might wrap its context and applications using that canvas will only interact with its interface. Another canvas implementation might expose the context and all give the application full control over the rendering cycle.