dojox/drawing/manager/Canvas (version 1.10)

Summary

Creates a dojox.gfx.surface to be used for Drawing. Note that The 'surface' that Drawing uses is actually a dojox.gfx.group. This allows for more versatility.

Called internally from a dojox.Drawing.

Note: Surface creation is asynchronous. Connect to onSurfaceReady in Drawing.

Usage

var foo = new Canvas(options);
dojox/drawing/manager/Canvas
Parameter Type Description
options Object

Property Summary

Method Summary

  • getScrollOffset() Get the scroll position of the canvas
  • getScrollWidth() Special method used to detect the width (and height) of the browser scrollbars.
  • resize(width,height) Method used to change size of canvas.
  • setDimensions(width,height,scrollx,scrolly) Internal.
  • setZoom(zoom) Internal.

Event Summary

  • onScroll() Event fires on scroll.NOT IMPLEMENTED

Properties

baseClass
useScrollbars
zoom

The amount the canvas is zoomed

Methods

getScrollOffset()

Get the scroll position of the canvas

Returns:object
getScrollWidth()

Special method used to detect the width (and height) of the browser scrollbars. Becomes memoized.

Returns:number
resize(width,height)

Method used to change size of canvas. Potentially called from a container like ContentPane. May be called directly.

Parameter Type Description
width undefined
height undefined
setDimensions(width,height,scrollx,scrolly)

Internal. Changes canvas size and sets scroll position. Do not call this, use resize().

Parameter Type Description
width undefined
height undefined
scrollx undefined
scrolly undefined
setZoom(zoom)

Internal. Zooms canvas in and out.

Parameter Type Description
zoom undefined

Events

onScroll()

Event fires on scroll.NOT IMPLEMENTED

Error in the documentation? Can’t find what you are looking for? Let us know!