dojox/gfx/_gfxBidiSupport.Surface (version 1.10)

Summary

a surface object to be used for drawings

Usage

var foo = new _gfxBidiSupport.Surface();
dojox/gfx/shape

See the dojox/gfx/_gfxBidiSupport.Surface reference documentation for more information.

Property Summary

  • isLoaded
  • textDirWill be used as default for Text/TextPath/Group objects that created by this surface and textDir wasn't directly specified for them, though the bidi support was loaded.

Method Summary

  • _getRealMatrix() always returns the identity matrix
  • _init()
  • _moveChildToBack(shape) moves a shape to back of the list of shapes
  • _moveChildToFront(shape) moves a shape to front of the list of shapes
  • add(shape) adds a shape to the list
  • clear(destroy) removes all shapes from a group/surface.
  • closeBatch() submits the current batch, append all pending child shapes to DOM
  • connect(name,object,method) connects a handler to an event on this shape
  • createCircle(circle) creates a circle shape
  • createEllipse(ellipse) creates an ellipse shape
  • createGroup() creates a group shape
  • createImage(image) creates a image shape
  • createLine(line) creates a line shape
  • createObject(shapeType,rawShape) creates an instance of the passed shapeType class
  • createPath(path) creates a path shape
  • createPolyline(points) creates a polyline/polygon shape
  • createRect(rect) creates a rectangle shape
  • createShape(shape) creates a shape object based on its type; it is meant to be used by group-like objects
  • createText(text) creates a text shape
  • createTextPath(text) creates a text shape
  • createViewport()
  • destroy() destroy all relevant external resources and release all external references to make this object garbage-collectible
  • disconnect(token) connects a handler by token from an event on this shape
  • getBoundingBox() Returns the bounding box Rectangle for this shape.
  • getDimensions() gets current width and height in pixels
  • getEventSource() returns a node, which can be used to attach event listeners
  • getTextDir()
  • on(type,listener) Connects an event to this shape.
  • openBatch() starts a new batch, subsequent new child shapes will be held in the batch instead of appending to the container directly.
  • remove(shape,silently) removes a shape from the list
  • setDimensions(width,height) sets the width and height of the rawNode
  • setTextDir(newTextDir) Used for propagation and change of textDir. newTextDir will be forced as textDir for all of it's children (Group/Text/TextPath).
  • whenLoaded(context,method)

Event Summary

  • onLoad(surface) local event, fired once when the surface is created asynchronously, used only when isLoaded is false, required only for Silverlight.

Properties

isLoaded
Defined by: dojox/gfx/shape
textDir

Will be used as default for Text/TextPath/Group objects that created by this surface and textDir wasn't directly specified for them, though the bidi support was loaded. Can be set in two ways:

  1. When the surface is created and textDir value passed to it as fourth parameter.
  2. Using the setTextDir(String) function, when this function is used the value of textDir propagates to all of it's children and the children of children (for Groups) etc.

Methods

_getRealMatrix()
Defined by dojox/gfx/shape

always returns the identity matrix

Returns:null
_init()
Defined by dojox/gfx/shape
_moveChildToBack(shape)
Defined by dojox/gfx/shape

moves a shape to back of the list of shapes

Parameter Type Description
shape dojox/gfx/shape.Shape

one of the child shapes to move to the front

Returns:function

moves a shape to back of the list of shapes

_moveChildToFront(shape)
Defined by dojox/gfx/shape

moves a shape to front of the list of shapes

Parameter Type Description
shape dojox/gfx/shape.Shape

one of the child shapes to move to the front

Returns:function

moves a shape to front of the list of shapes

add(shape)
Defined by dojox/gfx/shape

adds a shape to the list

Parameter Type Description
shape dojox/gfx/shape.Shape

the shape to add to the list

Returns:undefined
clear(destroy)
Defined by dojox/gfx/shape

removes all shapes from a group/surface.

Parameter Type Description
destroy Boolean
Optional

Indicates whether the children should be destroyed. Optional.

Returns:function

removes all shapes from a group/surface.

closeBatch()
Defined by dojox/gfx/shape

submits the current batch, append all pending child shapes to DOM

On canvas, this method flushes the pending redraws queue.

Returns:function

submits the current batch, append all pending child shapes to DOM

connect(name,object,method)
Defined by dojox/gfx/shape

connects a handler to an event on this shape

Parameter Type Description
name undefined
object undefined
method undefined
Returns:undefined
createCircle(circle)
Defined by dojox/gfx/shape

creates a circle shape

Parameter Type Description
circle Object

a circle object (see dojox/gfx.defaultCircle)

Returns:undefined
createEllipse(ellipse)
Defined by dojox/gfx/shape

creates an ellipse shape

Parameter Type Description
ellipse Object

an ellipse object (see dojox/gfx.defaultEllipse)

Returns:undefined
createGroup()
Defined by dojox/gfx/shape

creates a group shape

Returns:undefined
createImage(image)
Defined by dojox/gfx/shape

creates a image shape

Parameter Type Description
image Object

an image object (see dojox/gfx.defaultImage)

Returns:undefined
createLine(line)
Defined by dojox/gfx/shape

creates a line shape

Parameter Type Description
line Object

a line object (see dojox/gfx.defaultLine)

Returns:undefined
createObject(shapeType,rawShape)
Defined by dojox/gfx/shape

creates an instance of the passed shapeType class

Parameter Type Description
shapeType Function

a class constructor to create an instance of

rawShape Object

properties to be passed in to the classes 'setShape' method

Returns:null
createPath(path)
Defined by dojox/gfx/shape

creates a path shape

Parameter Type Description
path Object

a path object (see dojox/gfx.defaultPath)

Returns:undefined
createPolyline(points)
Defined by dojox/gfx/shape

creates a polyline/polygon shape

Parameter Type Description
points Object

a points object (see dojox/gfx.defaultPolyline) or an Array of points

Returns:undefined
createRect(rect)
Defined by dojox/gfx/shape

creates a rectangle shape

Parameter Type Description
rect Object

a path object (see dojox/gfx.defaultRect)

Returns:undefined
createShape(shape)
Defined by dojox/gfx/shape

creates a shape object based on its type; it is meant to be used by group-like objects

Parameter Type Description
shape Object

a shape descriptor object

Returns:any | undefined | null

dojox/gfx/shape.Shape | Null a fully instantiated surface-specific Shape object

createText(text)
Defined by dojox/gfx/shape

creates a text shape

Parameter Type Description
text Object

a text object (see dojox/gfx.defaultText)

Returns:undefined
createTextPath(text)
Defined by dojox/gfx/shape

creates a text shape

Parameter Type Description
text Object

a textpath object (see dojox/gfx.defaultTextPath)

Returns:undefined
createViewport()
Defined by dojox/gfx3d/object
Returns:undefined
destroy()
Defined by dojox/gfx/shape

destroy all relevant external resources and release all external references to make this object garbage-collectible

disconnect(token)
Defined by dojox/gfx/shape

connects a handler by token from an event on this shape

Parameter Type Description
token undefined
Returns:undefined
getBoundingBox()
Defined by dojox/gfx/shape

Returns the bounding box Rectangle for this shape.

Returns:null
getDimensions()
Defined by dojox/gfx/shape

gets current width and height in pixels

Returns:Object

object with properties "width" and "height"

getEventSource()
Defined by dojox/gfx/shape

returns a node, which can be used to attach event listeners

Returns:undefined
getTextDir()
Returns:undefined
on(type,listener)
Defined by dojox/gfx/shape

Connects an event to this shape.

Parameter Type Description
type undefined
listener undefined
Returns:undefined
openBatch()
Defined by dojox/gfx/shape

starts a new batch, subsequent new child shapes will be held in the batch instead of appending to the container directly.

Because the canvas renderer has no DOM hierarchy, the canvas implementation differs such that it suspends the repaint requests for this container until the current batch is closed by a call to closeBatch().

Returns:function

starts a new batch, subsequent new child shapes will be held in the batch instead of appending to the container directly.

remove(shape,silently)
Defined by dojox/gfx/shape

removes a shape from the list

Parameter Type Description
shape dojox/gfx/shape.Shape

the shape to remove

silently Boolean

if true, do not redraw a picture yet

Returns:function

removes a shape from the list

setDimensions(width,height)
Defined by dojox/gfx/shape

sets the width and height of the rawNode

Parameter Type Description
width String

width of surface, e.g., "100px"

height String

height of surface, e.g., "100px"

Returns:function

sets the width and height of the rawNode

setTextDir(newTextDir)

Used for propagation and change of textDir. newTextDir will be forced as textDir for all of it's children (Group/Text/TextPath).

Parameter Type Description
newTextDir String
whenLoaded(context,method)
Defined by dojox/gfx/shape
Parameter Type Description
context Object | Null
method Function | String

Events

onLoad(surface)
Defined by: dojox/gfx/shape

local event, fired once when the surface is created asynchronously, used only when isLoaded is false, required only for Silverlight.

Parameter Type Description
surface dojox/gfx/shape.Surface
Error in the documentation? Can’t find what you are looking for? Let us know!