class %ZEN.Component.canvas
extends component
HTML5 Canvas Element.
This is a wrapper around the HTML5 Canvas element.
This only works with an HTML5 browser that supports the Canvas element.
property content
as %ZEN.Datatype.html(CONTENT="MIXED",ESCAPE="HTML",XMLPROJECTION="content");
Fallback HTML content to display. This is diplayed in browsers that do not support the Canvas element.
property onrender
as %ZEN.Datatype.eventHandler;
onrender event handler:
This event is fired by the render method and can supply
the content displayed by this component.
As a convenience, the event is passed an argument, context, which is the graphic context of the canvas
element.
method %DrawHTML()
Static HTML display method: draw the BODY of this component
as HTML.
Subclasses implement this in order to render the static HTML
contents of a component.
method getContext()
[ Language = javascript ]
Return the 2D drawing context for this canvas element.
Returns null if the browser does not support the canvas element.
method renderContents()
[ Language = javascript ]
Render the contents of this component's canvas.
method setProperty(property, value, value2)
[ Language = javascript ]
Set the value of a named property.