Class WCanvasPaintDevice

java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WCanvasPaintDevice
All Implemented Interfaces:
WPaintDevice

public class WCanvasPaintDevice
extends WObject
implements WPaintDevice
A paint device for rendering using the HTML 5 <canvas> element.

The WCanvasPaintDevice is used by WPaintedWidget to render to the browser using the HTML 5 <canvas> element. You usually will not use the device directly, but rather rely on WPaintedWidget to use this device when appropriate.

Note: Older browsers do not have text support in <canvas>. Text is then rendered in an overlayed DIV and a consequence text is not subject to rotation and scaling components of the current transformation (but does take into account translation). On most browser you can use the WSvgImage or WVmlImage paint devices which do support text natively.