Class Index | File Index

Classes


Class Image


Extends View.
image !CONSTRUCTOR PARAMETERS ARE PROVIDED IN A OBJECT LITERAL!
Defined in: gamejs-gui.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Image(image, parent, size, position, surface, visible)
Field Summary
Field Attributes Field Name and Description
 
Fields borrowed from class View:
children, parent, position, size, surface
Method Summary
Method Attributes Method Name and Description
 
default paint implementation for image.
 
setImage(image)
set new image
Methods borrowed from class View:
addChild, blitChild, center, despatchEvent, destroy, draw, getGUI, getPosition, getRect, getSize, hide, isFocused, isHovered, isVisible, move, moveRelative, on, refresh, removeChild, resize, show, update
Class Detail
Image(image, parent, size, position, surface, visible)
Parameters:
{gamejs.Surface} image
to paint
{View} parent
parent element
{Array} size
array containing width & height of the element, eg. [width, height]
{Array} position
position of the view relative to parent, eg. [x, y]. OPTIONAL, default [0, 0]
{gamejs.Surface} surface
surface to render this view on, OPTIONAL
{Bool} visible
is this view visible? OPTIONAL, DEFAULT true
Field Detail
{gamejs.Surface} image
Method Detail
paint()
default paint implementation for image. If Image object size!=provided image surface size, image is stretched.

setImage(image)
set new image
Parameters:
{gamejs.Surface} image

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 15 2011 16:17:32 GMT+0300 (EEST)