Display Types

Summary
Display Types
circleA circle object.
Functions
circle:setBorderWidthSet the width of the border
circle:setFillColorSet the fill color for the circle
rectangleA rectangle object.
Functions
rectangle:setBorderWidthSet the width of the border
rectangle:setFillColorSet the fill color for the rectangle
lineA polyline object
Functions
line:setColorSet the color of the line
spriteA sprite object.
Functions
sprite:prepare(animation_name)Load an animation for the sprite
sprite:playStart the sprite animation.
sprite:pausePause the sprite animation.
layerA group of display objects possessing the same depth and blending characteristics.
Functions
layer:insert(display_object)Add a display object to this layer.
layer:setBlendFunc(src_blend, dest_blend)Set the blend function for this layer.
displayobjectAn object that can be displayed on the screen
Properties
xThe x coordinate
yThe y coordinate
Functions
displayobject:delete()Remove this object from the display and allow it to be garbage collected
geminiObjectThe base object type for all objects in Gemini.
Functions
geminiObject:addEventListener(name, listener)Add an event listener for the named type of event.
geminiObject:removeEventListener(name, listener)Remove an event listener for the named type of event.

circle

A circle object.

Inherits from: displayobject

Summary
Functions
circle:setBorderWidthSet the width of the border
circle:setFillColorSet the fill color for the circle

Functions

circle:setBorderWidth

method circle:setBorderWidth(width)

Set the width of the border

Parameters

widththe width of the border, zero for no border.

circle:setFillColor

method circle:setFillColor(r,
g,
b,
a)

Set the fill color for the circle

Parameters

rThe red component (0 to 1.0) of the color
gThe green component (0 to 1.0) of the color
bThe blue component (0 to 1.0) of the color
aThe alpha component (0 to 1.0) of the color

rectangle

A rectangle object.

Inherits from: displayobject

Summary
Functions
rectangle:setBorderWidthSet the width of the border
rectangle:setFillColorSet the fill color for the rectangle

Functions

rectangle:setBorderWidth

method rectangle:setBorderWidth(width)

Set the width of the border

Parameters

widththe width of the border, zero for no border.

rectangle:setFillColor

method rectangle:setFillColor(r,
g,
b,
a)

Set the fill color for the rectangle

Parameters

rThe red component (0 to 1.0) of the color
gThe green component (0 to 1.0) of the color
bThe blue component (0 to 1.0) of the color
aThe alpha component (0 to 1.0) of the color

line

A polyline object

Inherits from: displayobject

Summary
Functions
line:setColorSet the color of the line

Functions

line:setColor

Set the color of the line

Parameters

rThe red component (0 to 1.0) of the color
gThe green component (0 to 1.0) of the color
bThe blue component (0 to 1.0) of the color
aThe alpha component (0 to 1.0) of the color

sprite

A sprite object.

Inherits from: displayobject

Summary
Functions
sprite:prepare(animation_name)Load an animation for the sprite
sprite:playStart the sprite animation.
sprite:pausePause the sprite animation.

Functions

sprite:prepare(animation_name)

method sprite:prepare(animation_name)

Load an animation for the sprite

Parameters

animationThe (optional) name of the animation to use from the sprite set.  The default animation is used if this parameter is not present.

sprite:play

method sprite:play()

Start the sprite animation.

sprite:pause

method sprite:pause()

Pause the sprite animation.

layer

A group of display objects possessing the same depth and blending characteristics.

Inherits from: <displayGroup>

Summary
Functions
layer:insert(display_object)Add a display object to this layer.
layer:setBlendFunc(src_blend, dest_blend)Set the blend function for this layer.

Functions

layer:insert(display_object)

method layer:insert(display_object)

Add a display object to this layer.

Parameters

display_objectThe object to be added to the layer.

layer:setBlendFunc(src_blend, dest_blend)

Set the blend function for this layer.

Parameters

src_blendblend function for the source component
dest_blendblend function for the destination component

Possible blend functions are GL_ONE, GL_DST_ALPHA, GL_SRC_ALPHA, GL_ZERO

displayobject

An object that can be displayed on the screen

Inherits from: geminiObject

Summary
Properties
xThe x coordinate
yThe y coordinate
Functions
displayobject:delete()Remove this object from the display and allow it to be garbage collected

Properties

x

The x coordinate

y

The y coordinate

Functions

displayobject:delete()

Remove this object from the display and allow it to be garbage collected

geminiObject

The base object type for all objects in Gemini.

Summary
Functions
geminiObject:addEventListener(name, listener)Add an event listener for the named type of event.
geminiObject:removeEventListener(name, listener)Remove an event listener for the named type of event.

Functions

geminiObject:addEventListener(name, listener)

method geminiObject:addEventListener(name,
listener)

Add an event listener for the named type of event.

Parameters

namethe name of the event type
listenera function or table containing a function with the same name as the event that will be called when the object receives the event.

The listener function should accecpt the event object as a parameter.  See the Scene Template file for examples.

geminiObject:removeEventListener(name, listener)

method geminiObject:removeEventListener(name,
listener)

Remove an event listener for the named type of event.

Parameters

namethe name of the event type
listenera function or table that is the event handler
method circle:setBorderWidth(width)
Set the width of the border
method circle:setFillColor(r,
g,
b,
a)
Set the fill color for the circle
method rectangle:setBorderWidth(width)
Set the width of the border
method rectangle:setFillColor(r,
g,
b,
a)
Set the fill color for the rectangle
method sprite:prepare(animation_name)
Load an animation for the sprite
method sprite:play()
Start the sprite animation.
method sprite:pause()
Pause the sprite animation.
method layer:insert(display_object)
Add a display object to this layer.
method geminiObject:addEventListener(name,
listener)
Add an event listener for the named type of event.
method geminiObject:removeEventListener(name,
listener)
Remove an event listener for the named type of event.
An object that can be displayed on the screen
The base object type for all objects in Gemini.
An object passed to an event handler that contains information about the event that has occurred.
Close