Back

CreateCircle

Hello World
Content:
- Methods

Creates a circular game object.

cir = gfx.CreateCircle( width, color, lineWidth, lineColor, lineAlpha, group ) → app object: Circle

Example

cfg.Game;

function OnLoad()
{
    circle = gfx.CreateCircle( 0.4, 0xff1133, 6, 0x7799ff );
}

function OnReady()
{
    gfx.AddGraphic( circle, 0.3, 0.2 );
    gfx.Play();
}
    Copy     Copy All       Run      

Methods

The following methods are available on the Circle object:

alphanumber: fraction (0..1)
anglenumber: fraction (0..1)
Contains( x, y ) → boolean
dataobject
graphicunknown
groupstring
heightnumber: fraction (0..1)
pivotXnumber: fraction (0..1)
pivotYnumber: fraction (0..1)
scaleXnumber: factor
scaleYnumber: factor
Update()
visibleboolean
widthnumber
string
number: hexadecimal 0xrrggbb
number: fraction (0..1)
number: pixel
app object: Matrix
The objects alpha value
The rotation fraction of the object
cir.Contains
Checks if a point is contained in the sprite
An object for saving individual extra properties.
The objects group identifier
The height of the object
The x pivot for rotations
The y pivot for rotations
The horizontal scaling
The vertical scaling
cir.SetMatrix
Set the individual 2d transformation
cir.Update
Updates internal properties
Indicates the objects visibility state
The obects width