dojox/gfx/canvas_attach.Group (version 1.10)

Summary

a group shape (Canvas), which can be used to logically group shapes (e.g, to propagate matricies)

Usage

var foo = new canvas_attach.Group();
dojox/gfx/canvas

See the dojox/gfx/canvas_attach.Group reference documentation for more information.

Property Summary

Method Summary

  • _applyTransform() physically sets a matrix
  • _getRealMatrix() returns the cumulative ('real') transformation matrix by combining the shape's matrix with its parent's matrix
  • _makeDirty()
  • _moveChildToBack(shape)
  • _moveChildToFront(shape)
  • _moveToBack() renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()
  • _moveToFront() renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()
  • _render(ctx) render the group
  • _renderClip(ctx)
  • _renderDashedStroke(ctx,apply)
  • _renderFill(ctx,apply)
  • _renderShape(ctx)
  • _renderStroke(ctx,apply)
  • _renderTransform(ctx)
  • _setParent(parent,matrix) sets a parent
  • _updateParentMatrix(matrix) updates the parent matrix with new matrix
  • add(shape)
  • applyLeftTransform(matrix) multiplies the existing matrix with an argument on left side (matrix * this.matrix)
  • applyRightTransform(matrix) multiplies the existing matrix with an argument on right side (this.matrix * matrix)
  • applyTransform(matrix) a shortcut for dojox/gfx/shape.Shape.applyRightTransform
  • clear()
  • closeBatch() submits the current batch.
  • connect()
  • 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
  • destroy() Releases all internal resources owned by this shape.
  • disconnect()
  • getBoundingBox() Returns the bounding box Rectangle for this shape.
  • getClip()
  • getEventSource()
  • getFill() Returns the current fill object or null (see dojox/gfx.defaultLinearGradient, dojox/gfx.defaultRadialGradient, dojox/gfx.defaultPattern, or dojo/Color)
  • getNode() Different graphics rendering subsystems implement shapes in different ways.
  • getParent() Returns the parent Shape, Group or null if this Shape is unparented. (see dojox/gfx/shape.Surface, or dojox/gfx.Group)
  • getShape() returns the current Shape object or null (see dojox/gfx.defaultPath, dojox/gfx.defaultPolyline, dojox/gfx.defaultRect, dojox/gfx.defaultEllipse, dojox/gfx.defaultCircle, dojox/gfx.defaultLine, or dojox/gfx.defaultImage)
  • getStroke() Returns the current stroke object or null (see dojox/gfx.defaultStroke)
  • getTransform() Returns the current transformation matrix applied to this Shape or null
  • getTransformedBoundingBox() returns an array of four points or null four points represent four corners of the untransformed bounding box
  • moveToBack() moves a shape to back of its parent's list of shapes
  • moveToFront() moves a shape to front of its parent's list of shapes
  • on()
  • 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)
  • removeShape(silently) removes the shape from its parent's list of shapes
  • setClip(clip)
  • setFill(fill) sets a fill object (the default implementation simply ignores it)
  • setShape(shape) sets a shape object (the default implementation simply ignores it)
  • setStroke(stroke) sets a stroke object (the default implementation simply ignores it)
  • setTransform(matrix) sets a transformation matrix

Properties

canvasClip
Defined by: dojox/gfx/canvas

Methods

_applyTransform()
Defined by dojox/gfx/shape

physically sets a matrix

Returns:function

physically sets a matrix

_getRealMatrix()
Defined by dojox/gfx/shape

returns the cumulative ('real') transformation matrix by combining the shape's matrix with its parent's matrix

Returns:undefined
_makeDirty()
Defined by dojox/gfx/canvas
_moveChildToBack(shape)
Defined by dojox/gfx/canvas
Parameter Type Description
shape undefined
Returns:undefined
_moveChildToFront(shape)
Defined by dojox/gfx/canvas
Parameter Type Description
shape undefined
Returns:undefined
_moveToBack()
Defined by dojox/gfx/shape

renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()

_moveToFront()
Defined by dojox/gfx/shape

renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()

_render(ctx)
Defined by dojox/gfx/canvas

render the group

Parameter Type Description
ctx Object
_renderClip(ctx)
Defined by dojox/gfx/canvas
Parameter Type Description
ctx undefined
_renderDashedStroke(ctx,apply)
Defined by dojox/gfx/canvas
Parameter Type Description
ctx undefined
apply undefined
_renderFill(ctx,apply)
Defined by dojox/gfx/canvas
Parameter Type Description
ctx Object
apply Boolean
_renderShape(ctx)
Defined by dojox/gfx/canvas
Parameter Type Description
ctx Object
_renderStroke(ctx,apply)
Defined by dojox/gfx/canvas
Parameter Type Description
ctx Object
apply Boolean
_renderTransform(ctx)
Defined by dojox/gfx/canvas
Parameter Type Description
ctx Object
_setParent(parent,matrix)
Defined by dojox/gfx/shape

sets a parent

Parameter Type Description
parent Object

a parent or null (see dojox/gfx/shape.Surface, or dojox/gfx.Group)

matrix dojox/gfx/matrix.Matrix2D

a 2D matrix or a matrix-like object

Returns:undefined
_updateParentMatrix(matrix)
Defined by dojox/gfx/shape

updates the parent matrix with new matrix

Parameter Type Description
matrix dojox/gfx/Matrix2D

a 2D matrix or a matrix-like object

Returns:undefined
add(shape)
Defined by dojox/gfx/canvas
Parameter Type Description
shape undefined
Returns:undefined
applyLeftTransform(matrix)
Defined by dojox/gfx/shape

multiplies the existing matrix with an argument on left side (matrix * this.matrix)

Parameter Type Description
matrix dojox/gfx/matrix.Matrix2D

a matrix or a matrix-like object (see an argument of dojox/gfx/matrix.Matrix2D constructor for a list of acceptable arguments)

Returns:function

multiplies the existing matrix with an argument on left side (matrix * this.matrix)

applyRightTransform(matrix)
Defined by dojox/gfx/shape

multiplies the existing matrix with an argument on right side (this.matrix * matrix)

Parameter Type Description
matrix dojox/gfx/matrix.Matrix2D

a matrix or a matrix-like object (see an argument of dojox/gfx/matrix.Matrix2D constructor for a list of acceptable arguments)

Returns:function

multiplies the existing matrix with an argument on right side (this.matrix * matrix)

applyTransform(matrix)
Defined by dojox/gfx/shape

a shortcut for dojox/gfx/shape.Shape.applyRightTransform

Parameter Type Description
matrix dojox/gfx/matrix.Matrix2D

a matrix or a matrix-like object (see an argument of dojox/gfx/matrix.Matrix2D constructor for a list of acceptable arguments)

Returns:function

a shortcut for dojox/gfx/shape.Shape.applyRightTransform

clear()
Defined by dojox/gfx/canvas
Returns:undefined
closeBatch()
Defined by dojox/gfx/canvas

submits the current batch.

On canvas, this method flushes the pending redraws queue.

Returns:function

submits the current batch.

connect()
Defined by dojox/gfx/canvas
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/canvas

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:instance
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
destroy()
Defined by dojox/gfx/canvas

Releases all internal resources owned by this shape. Once this method has been called, the instance is considered disposed and should not be used anymore.

disconnect()
Defined by dojox/gfx/canvas
getBoundingBox()
Defined by dojox/gfx/canvas

Returns the bounding box Rectangle for this shape.

Returns:null
getClip()
Defined by dojox/gfx/shape
Returns:undefined
getEventSource()
Defined by dojox/gfx/canvas
Returns:null
getFill()
Defined by dojox/gfx/shape

Returns the current fill object or null (see dojox/gfx.defaultLinearGradient, dojox/gfx.defaultRadialGradient, dojox/gfx.defaultPattern, or dojo/Color)

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

Different graphics rendering subsystems implement shapes in different ways. This method provides access to the underlying graphics subsystem object. Clients calling this method and using the return value must be careful not to try sharing or using the underlying node in a general way across renderer implementation. Returns the underlying graphics Node, or null if no underlying graphics node is used by this shape.

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

Returns the parent Shape, Group or null if this Shape is unparented. (see dojox/gfx/shape.Surface, or dojox/gfx.Group)

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

returns the current Shape object or null (see dojox/gfx.defaultPath, dojox/gfx.defaultPolyline, dojox/gfx.defaultRect, dojox/gfx.defaultEllipse, dojox/gfx.defaultCircle, dojox/gfx.defaultLine, or dojox/gfx.defaultImage)

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

Returns the current stroke object or null (see dojox/gfx.defaultStroke)

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

Returns the current transformation matrix applied to this Shape or null

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

returns an array of four points or null four points represent four corners of the untransformed bounding box

Returns:null | Array
moveToBack()
Defined by dojox/gfx/shape

moves a shape to back of its parent's list of shapes

Returns:function

moves a shape to back of its parent's list of shapes

moveToFront()
Defined by dojox/gfx/shape

moves a shape to front of its parent's list of shapes

Returns:function

moves a shape to front of its parent's list of shapes

on()
Defined by dojox/gfx/canvas
openBatch()
Defined by dojox/gfx/canvas

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/canvas
Parameter Type Description
shape undefined
silently undefined
Returns:undefined
removeShape(silently)
Defined by dojox/gfx/shape

removes the shape from its parent's list of shapes

Parameter Type Description
silently Boolean

if true, do not redraw a picture yet

Returns:function

removes the shape from its parent's list of shapes

setClip(clip)
Defined by dojox/gfx/canvas
Parameter Type Description
clip Object
Returns:function
setFill(fill)
Defined by dojox/gfx/shape

sets a fill object (the default implementation simply ignores it)

Parameter Type Description
fill Object

a fill object (see dojox/gfx.defaultLinearGradient, dojox/gfx.defaultRadialGradient, dojox/gfx.defaultPattern, or dojo/_base/Color)

Returns:function

sets a fill object (the default implementation simply ignores it)

setShape(shape)
Defined by dojox/gfx/shape

sets a shape object (the default implementation simply ignores it)

Parameter Type Description
shape Object

a shape object (see dojox/gfx.defaultPath, dojox/gfx.defaultPolyline, dojox/gfx.defaultRect, dojox/gfx.defaultEllipse, dojox/gfx.defaultCircle, dojox/gfx.defaultLine, or dojox/gfx.defaultImage)

Returns:function

sets a shape object (the default implementation simply ignores it)

setStroke(stroke)
Defined by dojox/gfx/shape

sets a stroke object (the default implementation simply ignores it)

Parameter Type Description
stroke Object

a stroke object (see dojox/gfx.defaultStroke)

Returns:function

sets a stroke object (the default implementation simply ignores it)

setTransform(matrix)
Defined by dojox/gfx/shape

sets a transformation matrix

Parameter Type Description
matrix dojox/gfx/matrix.Matrix2D

a matrix or a matrix-like object (see an argument of dojox/gfx/matrix.Matrix2D constructor for a list of acceptable arguments)

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