CG.Text Class
Future plans: CG.Text => support for different text drawing modes like textblock, text alignment, text ticker or scroller.
var t = new CG.Text({
font: abdi // the font object (CG.Font) to use
})
Item Index
Methods
AABB
()
Object
returns the bounds of rotated rectangle
Returns:
Object:
returns the calculated bounds
checkCollision
(
-
objects
-
callback
checks if there is a collision of the given objects to this object http://devmag.org.za/2009/04/13/basic-collision-detection-in-2d-part-1/
Parameters:
-
objects
Arraya array of objects to check for collision => Sprites, Animations, MapAreas
-
callback
Callbackwhat to do after collision?
draw
()
ifClicked
()
True/false
checks click inside of the rectangle, supports rotation
Returns:
True/false:
ifMouseOver
()
checks if the mouse/pointer is over the rectangle
setImage
(
-
image
initialize image for object. for now => sprite, particle, buffer, bitmap and button use it
Parameters:
-
image
Imageimage path, image or atlasimage
update
()
Properties
transform
Transform
Transform object for matrix transformation