Class: xrx.drawing.Layer

xrx.drawing. Layer

(private) new xrx.drawing.Layer(drawing)

An abstract class representing a layer of a drawing canvas.
Parameters:
Name Type Description
drawing xrx.drawing.Drawing The parent drawing object.
Source:

Members

(private) xrx.drawing.Layer#drawing_

Source:

(private) xrx.drawing.Layer#group_

Source:

(private) xrx.drawing.Layer#locked_

Source:

(private) xrx.drawing.Layer#shapes_

Source:

Methods

xrx.drawing.Layer#addShapes(shapes)

Adds shapes to the layer.
Parameters:
Name Type Description
shapes xrx.shape.Shape The shapes.
Source:

(private) xrx.drawing.Layer#create_()

Source:

xrx.drawing.Layer#disposeInternal()

Disposes this layer.
Source:

xrx.drawing.Layer#draw()

Draws all shapes of the layer.
Source:

xrx.drawing.Layer#getDrawing() → {xrx.drawing.Drawing}

Returns the drawing object.
Source:
Returns:
Type
xrx.drawing.Drawing

xrx.drawing.Layer#getGroup() → {Object}

Returns the layers' group.
Source:
Returns:
The group.
Type
Object

xrx.drawing.Layer#getShapes() → {xrx.shape.Shape}

Returns the shapes of the layer.
Source:
Returns:
The shapes.
Type
xrx.shape.Shape

xrx.drawing.Layer#isLocked() → {boolean}

Returns whether the layer is locked currently.
Source:
Returns:
Locked or not.
Type
boolean

xrx.drawing.Layer#removeShape(shape)

Removes one shape from the layer.
Parameters:
Name Type Description
shape xrx.shape.Shape The shape to remove.
Source:

xrx.drawing.Layer#removeShapes()

Removes all shapes from the layer;
Source:

xrx.drawing.Layer#setLocked(flag)

Locks or unlocks the layer so that the shapes are ignored by xrx.event.HandlerTarget.
Parameters:
Name Type Description
flag boolean Whether to lock or unlock the layer.
Source: