Class src/text.js
jaws.Text
- Defined in: text.js
Constructor Attributes | Constructor Name and Description |
---|---|
src/text.js()
A jaws.Text object with word-wrapping functionality.
|
Field Attributes | Field Name and Description |
---|---|
alpha/text.js#alpha
Transparency: 0 (fully transparent) to 1 (no transparency)
|
|
anchor/text.js#anchor
String stating how to anchor the sprite to canvas; @see Sprite#anchor
|
|
angle/text.js#angle
Angle in degrees (0-360)
|
|
fontFace/text.js#fontFace
A valid font-family
|
|
fontSize/text.js#fontSize
The size of the text in pixels
|
|
height/text.js#height
The height of the rect() containing the text
|
|
shadowBlur/text.js#shadowBlur
The amount of shadow blur (length away from text)
|
|
shadowColor/text.js#shadowColor
The color of the shadow for the text
|
|
shadowOffsetX/text.js#shadowOffsetX
The start of the shadow from initial x
|
|
shadowOffsetY/text.js#shadowOffsetY
The start of the shadow from initial y
|
|
style/text.js#style
The style to draw the text: "normal", "bold" or italic"
|
|
text/text.js#text
The actual text to be displayed
|
|
textAlign/text.js#textAlign
"start", "end", "left", "right", or "center"
|
|
textBaseline/text.js#textBaseline
"top", "bottom", "hanging", "middle", "alphabetic", or "ideographic"
|
|
width/text.js#width
The width of the rect() containing the text
|
|
wordWrap/text.js#wordWrap
If word-wrapping should be attempted
|
|
x/text.js#x
Horizontal position (0 = furthest left)
|
|
y/text.js#y
Vertical position (0 = top)
|
Class Detail
src/text.js()
A jaws.Text object with word-wrapping functionality.
var text = new Text({text: "Hello world!", x: 10, y: 10})
Field Detail
{number}
alpha
Transparency: 0 (fully transparent) to 1 (no transparency)
{string}
anchor
String stating how to anchor the sprite to canvas; @see Sprite#anchor
{number}
angle
Angle in degrees (0-360)
{string}
fontFace
A valid font-family
{number}
fontSize
The size of the text in pixels
{number}
height
The height of the rect() containing the text
{number}
shadowBlur
The amount of shadow blur (length away from text)
{string}
shadowColor
The color of the shadow for the text
{number}
shadowOffsetX
The start of the shadow from initial x
{number}
shadowOffsetY
The start of the shadow from initial y
{string}
style
The style to draw the text: "normal", "bold" or italic"
{string}
text
The actual text to be displayed
{string}
textAlign
"start", "end", "left", "right", or "center"
{string}
textBaseline
"top", "bottom", "hanging", "middle", "alphabetic", or "ideographic"
{number}
width
The width of the rect() containing the text
{boolean}
wordWrap
If word-wrapping should be attempted
{integer}
x
Horizontal position (0 = furthest left)
{integer}
y
Vertical position (0 = top)