Class TextRect
represents text in rectangular frame
Defined in: raphaeltools.src.js.
Constructor Attributes | Constructor Name and Description |
---|---|
TextRect(raphael, params)
Text in rectangular frame
|
Field Attributes | Field Name and Description |
---|---|
font size
|
|
height of rectangle
|
|
raphael rect object
|
|
text to display
|
|
raphael text object
|
|
width of rectangle
|
|
x coordinate of top left corner
|
|
z coordinate of top left corner
|
Method Attributes | Method Name and Description |
---|---|
constructorTextRect(raphael, params)
Constructor, see TextRect for parameters description
|
|
<static> |
TextRect.create(raphael, params)
Creates new TextRect object, for parameters meaning see TextRect
|
setStr(str)
Sets new text of receiver
|
|
setX(x)
Sets new x position of receiver (this.x = x)
|
|
setXZ(x, z)
Sets new x and z position of receiver (this.x = x; this.z = z)
|
|
setZ(z)
Sets new z position of receiver (this.z = z)
|
|
up()
Update receiver (set this.pathList for given internal variables)
|
Class Detail
TextRect(raphael, params)
Text in rectangular frame
- Parameters:
- {Raphael} raphael
- rapheal instance
- {Object} params
- parameters, see below
- {float} params.x Optional, Default: 100.
- x coordinate of left lower corner [pixel]
- {float} params.z Optional, Default: 100.
- z coordinate of left lower corner [pixel]
- {float} params.width Optional, Default: 100.
- width [pixel]
- {float} params.height Optional, Default: 100.
- height [pixel]
- {string} params.str Optional, Default: "string"
- string to be shown
- {float} params.fontSize Optional, Default: 20.
- font size
Field Detail
{float}
fontSize
font size
{float}
height
height of rectangle
{Raphael.rect}
rect
raphael rect object
{string}
str
text to display
{Raphael.text}
text
raphael text object
{float}
width
width of rectangle
{float}
x
x coordinate of top left corner
{float}
z
z coordinate of top left corner
Method Detail
constructorTextRect(raphael, params)
Constructor, see TextRect for parameters description
- Parameters:
- raphael
- params
<static>
{TextRect}
TextRect.create(raphael, params)
Creates new TextRect object, for parameters meaning see TextRect
- Parameters:
- raphael
- params
- Returns:
- {TextRect} new TextRect object
setStr(str)
Sets new text of receiver
- Parameters:
- {string} str
- new string
setX(x)
Sets new x position of receiver (this.x = x)
- Parameters:
- {float} x
- new x coordinate [pixel]
setXZ(x, z)
Sets new x and z position of receiver (this.x = x; this.z = z)
- Parameters:
- {float} x
- new x coordinate [pixel]
- {float} z
- new z coordinate [pixel]
setZ(z)
Sets new z position of receiver (this.z = z)
- Parameters:
- {float} z
- new z coordinate [pixel]
up()
Update receiver (set this.pathList for given internal variables)