This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > %SYS namespace > %ZEN.Component.canvas

%ZEN.Component.canvas

class %ZEN.Component.canvas extends %ZEN.Component.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 Inventory

Method Inventory

Properties

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 methods: contentDisplayToLogical(), contentGet(), contentIsValid(), contentLogicalToDisplay(), contentLogicalToOdbc(), contentNormalize(), contentSet()
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.
Property methods: onrenderDisplayToLogical(), onrenderGet(), onrenderIsValid(), onrenderLogicalToDisplay(), onrenderLogicalToOdbc(), onrenderNormalize(), onrenderSet()

Methods

method %DrawHTML()
Inherited description: 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.
clientmethod getContext() [ Language = javascript ]
Return the 2D drawing context for this canvas element.
Returns null if the browser does not support the canvas element.
clientmethod renderContents() [ Language = javascript ]
Render the contents of this component's canvas.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new window