dojox/gfx/vml_attach.Text (version 1.10)

Summary

an anchored text (VML)

Usage

var foo = new vml_attach.Text(rawNode);
dojox/gfx/vml
Parameter Type Description
rawNode undefined

See the dojox/gfx/vml_attach.Text reference documentation for more information.

Property Summary

Method Summary

  • _applyTransform()
  • _getRealMatrix() returns the cumulative ("real") transformation matrix by combining the shape's matrix with its parent's matrix; it makes a correction for a font size
  • _moveToBack() moves a shape to back of its parent's list of shapes (VML)
  • _moveToFront() moves a shape to front of its parent's list of shapes (VML)
  • _setDimensions(width,height) sets the width and height of the rawNode, if the surface size has been changed
  • _setFont() sets a font object (VML)
  • _setParent(parent,matrix) sets a parent
  • _translate(dict,value)
  • _updateParentMatrix(matrix) updates the parent matrix with new matrix
  • 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
  • bidiPreprocess(newShape)
  • connect(name,object,method) connects a handler to an event on this shape
  • destroy() Releases all internal resources owned by this shape.
  • disconnect(token) connects a handler by token from an event on this shape
  • formatText(text,textDir) Applies the right transform on text, according to renderer.
  • getBoundingBox() Returns the bounding box Rectangle for this shape or null if a BoundingBox cannot be calculated for the shape on the current renderer or for shapes with no geometric area (points).
  • getClip()
  • getEventSource() returns a Node, which is used as a source of events for this shape
  • getFill() Returns the current fill object or null (see dojox/gfx.defaultLinearGradient, dojox/gfx.defaultRadialGradient, dojox/gfx.defaultPattern, or dojo/Color)
  • getFont() returns the current font object or null
  • 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)
  • getTextWidth() get the text width, in px
  • 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(type,listener) Connects an event to this shape.
  • removeShape(silently) removes the shape from its parent's list of shapes
  • setClip(clip) sets the clipping area of this shape.
  • setFill(fill) sets a fill object (VML)
  • setFont(newFont) sets a font for text
  • setRawNode(rawNode) assigns and clears the underlying node that will represent this shape.
  • setShape(newShape) sets a text shape object (VML)
  • setStroke(stroke) sets a stroke object (VML)
  • setTransform(matrix) sets a transformation matrix

Properties

_alignment
Defined by: dojox/gfx/vml
_capMap
Defined by: dojox/gfx/vml
_capMapReversed
Defined by: dojox/gfx/vml
nodeType
Defined by: dojox/gfx/vml
textDir

Used for displaying bidi scripts in right layout. Defines the base direction of text that displayed, can have 3 values:

  1. "ltr" - base direction is left to right.
  2. "rtl" - base direction is right to left.
  3. "auto" - base direction is contextual (defined by first strong character).

Methods

_applyTransform()
Defined by dojox/gfx/vml
Returns:function
_getRealMatrix()
Defined by dojox/gfx/vml

returns the cumulative ("real") transformation matrix by combining the shape's matrix with its parent's matrix; it makes a correction for a font size

Returns:undefined
_moveToBack()
Defined by dojox/gfx/vml

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

Returns:function

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

_moveToFront()
Defined by dojox/gfx/vml

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

Returns:function

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

_setDimensions(width,height)
Defined by dojox/gfx/vml

sets the width and height of the rawNode, if the surface size has been changed

Parameter Type Description
width String

width in pixels

height String

height in pixels

Returns:function

sets the width and height of the rawNode, if the surface size has been changed

_setFont()
Defined by dojox/gfx/vml

sets a font object (VML)

_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
_translate(dict,value)
Defined by dojox/gfx/vml
Parameter Type Description
dict undefined
value undefined
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
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

bidiPreprocess(newShape)
Parameter Type Description
newShape undefined
Returns:undefined
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
destroy()
Defined by dojox/gfx/shape

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

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
formatText(text,textDir)

Applies the right transform on text, according to renderer.

Finds the right transformation that should be applied on the text, according to renderer. Was tested in:

Renderers (browser for testing):

  • canvas (FF, Chrome, Safari),
  • vml (IE),
  • svg (FF, Chrome, Safari, Opera),
  • silverlight (IE, Chrome, Safari, Opera),
  • svgWeb(FF, Chrome, Safari, Opera, IE).

Browsers [browser version that was tested]:

  • IE [6,7,8], FF [3.6],
  • Chrome (latest for March 2011),
  • Safari [5.0.3],
  • Opera [11.01].
Parameter Type Description
text String

the string for manipulation, by default return value.

textDir String

Text direction. Can be:

  1. "ltr" - for left to right layout.
  2. "rtl" - for right to left layout
  3. "auto" - for contextual layout: the first strong letter decides the direction.
Returns:String | undefined | string

the string for manipulation, by default return value.

getBoundingBox()
Defined by dojox/gfx/shape

Returns the bounding box Rectangle for this shape or null if a BoundingBox cannot be calculated for the shape on the current renderer or for shapes with no geometric area (points). A bounding box is a rectangular geometric region defining the X and Y extent of the shape. (see dojox/gfx.defaultRect) Note that this method returns a direct reference to the attribute of this instance. Therefore you should not modify its value directly but clone it instead.

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

returns a Node, which is used as a source of events for this shape

Returns:undefined
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
getFont()
Defined by dojox/gfx/shape

returns the current font object or null

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
getTextWidth()
Defined by dojox/gfx/vml

get the text width, in px

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(type,listener)
Defined by dojox/gfx/shape

Connects an event to this shape.

Parameter Type Description
type undefined
listener 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/vml

sets the clipping area of this shape.

This method overrides the dojox/gfx/shape.Shape.setClip() method. Only rectangular geometry is supported.

Parameter Type Description
clip Object

an object that defines the clipping geometry, or null to remove clip.

Returns:function

sets the clipping area of this shape.

setFill(fill)
Defined by dojox/gfx/vml

sets a fill object (VML)

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 (VML)

setFont(newFont)
Defined by dojox/gfx/shape

sets a font for text

Parameter Type Description
newFont Object

a font object (see dojox/gfx.defaultFont) or a font string

Returns:function

sets a font for text

setRawNode(rawNode)
Defined by dojox/gfx/vml

assigns and clears the underlying node that will represent this shape. Once set, transforms, gradients, etc, can be applied. (no fill & stroke by default)

Parameter Type Description
rawNode undefined
setShape(newShape)
Defined by dojox/gfx/vml

sets a text shape object (VML)

Parameter Type Description
newShape Object

a text shape object

Returns:undefined
setStroke(stroke)
Defined by dojox/gfx/vml

sets a stroke object (VML)

Parameter Type Description
stroke Object

a stroke object (see dojox/gfx.defaultStroke)

Returns:function

sets a stroke object (VML)

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!