(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. |
Members
-
(private) xrx.drawing.Layer#drawing_
-
(private) xrx.drawing.Layer#group_
-
(private) xrx.drawing.Layer#locked_
-
(private) xrx.drawing.Layer#shapes_
Methods
-
xrx.drawing.Layer#addShapes(shapes)
-
Adds shapes to the layer.
Parameters:
Name Type Description shapes
xrx.shape.Shape The shapes. -
(private) xrx.drawing.Layer#create_()
-
xrx.drawing.Layer#disposeInternal()
-
Disposes this layer.
-
xrx.drawing.Layer#draw()
-
Draws all shapes of the layer.
-
xrx.drawing.Layer#getDrawing() → {xrx.drawing.Drawing}
-
Returns the drawing object.
Returns:
- Type
- xrx.drawing.Drawing
-
xrx.drawing.Layer#getGroup() → {Object}
-
Returns the layers' group.
Returns:
The group.- Type
- Object
-
xrx.drawing.Layer#getShapes() → {xrx.shape.Shape}
-
Returns the shapes of the layer.
Returns:
The shapes.- Type
- xrx.shape.Shape
-
xrx.drawing.Layer#isLocked() → {boolean}
-
Returns whether the layer is locked currently.
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. -
xrx.drawing.Layer#removeShapes()
-
Removes all shapes from the layer;
-
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.