Back

CreateEllipse

JS Py
Hello World
Content:
- Properties
- Methods

Creates a elliptical game object.

elp = gfx.CreateEllipse( width, height, color, lineWidth?, lineColor?, lineAlpha?, group? ) → game object: Ellipse

Example - 2

cfg.Game;

function OnLoad()
{
    ellipse = gfx.CreateEllipse( 0.7, 0.4*gfx.aspect, 0xcccc00, 10, 0xbb00ff );
}

function OnReady()
{
    gfx.AddGraphic( ellipse, 0.1, 0.2 );
    gfx.Play();
}
# cfg.Game

def OnLoad():
    global ellipse
    ellipse = gfx.CreateEllipse(0.7, 0.4*gfx.aspect, 0xcccc00, 10, 0xbb00ff)

def OnReady():
    gfx.AddGraphic(ellipse, 0.1, 0.2)
    gfx.Play()
    Copy     Copy All       Run      

Properties

The following properties are available on the Ellipse object:

alphaNumber: fraction (0..1)
angleNumber: fraction (0..1)
dataObject: { key, value }
graphicObject
groupString
heightNumber: fraction (0..1)
pivotXNumber: fraction (0..1)
pivotYNumber: fraction (0..1)
scaleXNumber: factor
scaleYNumber: factor
visibleBoolean
widthNumber

Methods

The following methods are available on the Ellipse object:

Contains( x, y ) → Boolean
Update()
all types
String
Number: hexadecimal 0xrrggbb
Number: fraction (0..1)
Number: pixel
Object: Matrix
elp.alpha
The objects alpha value
elp.angle
The rotation fraction of the object
elp.Contains
Checks if a point is contained in the sprite
elp.data
An object for saving individual extra properties.
elp.graphic
the PIXI graphic
elp.group
The objects group identifier
elp.height
The height of the object
elp.pivotX
The x pivot for rotations
elp.pivotY
The y pivot for rotations
elp.scaleX
The horizontal scaling
elp.scaleY
The vertical scaling
elp.SetMatrix
Set the individual 2d transformation
elp.Update
Updates internal properties
elp.visible
Indicates the objects visibility state
elp.width
The obects width