method createRect

rect createRect(int32 x,int32 y,int32 width,int32 height);

Argumente

Zurückgegebener Wert

This method returns a Rect object created with the given rectangle.
For more information please see rect class.
function onSample()
{
    var factory = shell.factory;
    var rect = (factory) ? factory.createRect(10, 10, 800, 600) : null;
    if (rect)
    {
        shell.print("x = " + rect.x);
        shell.print("y = " + rect.y);
        shell.print("w = " + rect.width);
        shell.print("h = " + rect.height);
    }
}