public final class Graphics

Package :

(default package)

Description :

Handles all graphic stuff : drawing lines, circles, rectangle... The idea is to store the Javascript instructions into a function array which will be executed every time a new drawing is needed.

Methods :

public final new(element)

Creates a new public final Graphics object.

Parameters :

private addPoint(x, y)

Adding a point to the Graphics object. This helps calculating the object's size.

Parameters :

public arc(x, y, r, start, end, way)

Drawing an arc.

Parameters :

Returns :

The current Graphics object.

public beginBitmapFill(imageUrl)

Starting to fill with the specified image.

Parameters :

Returns :

The current Graphics object.

public beginFill(color)

Starting to fill a shape with the specified color

Parameters :

Returns :

The current Graphics object.

public clear()

Clearing the graphics object.

Returns :

The current Graphics object.

public clip(x, y)

Clipping the drawing region to the drawn area.

Parameters :

Returns :

The current Graphics object.

public copy(graphics)

Parameters :

Returns :

The current Graphics object.

public draw(context)

Drawing the graphics object : executing every stored instruction.

Parameters :

public endFill(notLast)

Ending the current fill. If other shapes will be drawn after the current one, notLast should be set to true.

Parameters :

Returns :

The current Graphics object.

public height()

Getting the graphical height.

Returns :

The height.

public image(imageUrl, The, The)

Drawing an image at the specified position.

Parameters :

Returns :

The current Graphics object.

public lineStyle(color, thickness)

Setting the linestyle

Parameters :

Returns :

The current Graphics object.

public lineTo(x, y)

Drawing a line from the cursor to the specified position.

Parameters :

Returns :

The current Graphics object.

public moveTo(x, y)

Moving the cursor to the specified position.

Parameters :

Returns :

The current Graphics object.

public rect(x, y, w, h)

Drawing a rectangle.

Parameters :

Returns :

The current Graphics object.

public shadowStyle(color, blur, x, y)

Setting the shadow style

Parameters :

Returns :

The current Graphics object.

public size()

Getting the number of functions to call to draw the entire Graphics object.

Returns :

The number of instructions.

public width()

Getting the graphical width.

Returns :

The width.