new Mensaje(escenario, capa, propiedades)
Parameters:
Name | Type | Description |
---|---|---|
escenario |
stage | Escenario donde pintar el mensaje |
capa |
layer | Capa donde pintar el grid |
propiedades |
Object | Conjunto de propiedades a establecer al mensaje. Como Color fuente, posición, etc. Ver refencia Kinetic.Text. |
- Source:
- mensaje.js, line 3
Members
-
<static> defecto
-
Valores por defecto para el texto
- Source:
- mensaje.js, line 24
Methods
-
getHeight() → {number}
-
Obtiene el alto del texto.
- Source:
- mensaje.js, line 106
Returns:
Alto del texto.- Type
- number
-
getText() → {String}
-
Texto del mensaje
- Source:
- mensaje.js, line 56
Returns:
texto actual del mensaje- Type
- String
-
getWidth() → {number}
-
Obtiene el ancho del texto.
- Source:
- mensaje.js, line 98
Returns:
Ancho del texto.- Type
- number
-
getX() → {number}
-
Obtiene la posición X absoluta del texto
- Source:
- mensaje.js, line 73
Returns:
posición X del mensaje.- Type
- number
-
getY() → {number}
-
Obtiene la posición Y absoluta del texto
- Source:
- mensaje.js, line 90
Returns:
posición Y del mensaje.- Type
- number
-
setText(texto)
-
Cambia el texto del mensaje
Parameters:
Name Type Description texto
String Nuevo texto - Source:
- mensaje.js, line 47
-
setX(x)
-
Mueve el esto a la posición x de la capa o contenedor
Parameters:
Name Type Description x
number Posición en el eje x del texto - Source:
- mensaje.js, line 64
-
setY(x)
-
Mueve el esto a la posición x de la capa o contenedor
Parameters:
Name Type Description x
number Posición en el eje x del texto - Source:
- mensaje.js, line 81