Class: xrx.shape.Shape

xrx.shape. Shape

(private) new xrx.shape.Shape(drawing)

Super-class representing an engine-independent shape.
Parameters:
Name Type Description
drawing xrx.drawing.Drawing The parent drawing canvas.
Source:

Extends

Members

(private) xrx.shape.Shape#creatable_ :xrx.shape.Creatable

A creatable helper shape.
Type:
Source:

(private) xrx.shape.Shape#drawing_ :xrx.drawing.Drawing

The parent drawing canvas.
Type:
Source:

(private) xrx.shape.Shape#fill_ :Object

Object describing the fill style.
Type:
  • Object
Inherited From:
Source:

(private) xrx.shape.Shape#fillChanged_ :Object

Object describing whether the fill style did change since the last drawing.
Type:
  • Object
Inherited From:
Source:

xrx.shape.Shape#getCreatable

Abstract function to be implemented by each shape class. Returns a creatable helper shape.
Source:

xrx.shape.Shape#getHoverable

Abstract function to be implemented by each shape class. Returns a hoverable helper shape.
Source:

xrx.shape.Shape#getModifiable

Abstract function to be implemented by each shape class. Returns a modifiable helper shape.
Source:

xrx.shape.Shape#getSelectable

Abstract function to be implemented by each shape class. Returns a selectable helper shape.
Source:

(private) xrx.shape.Shape#hasDom_ :boolean

Whether this shape has a DOM representation.
Type:
  • boolean
Inherited From:
Source:

(private) xrx.shape.Shape#hoverable_ :xrx.shape.Hoverable

A hoverable helper shape.
Type:
Source:

xrx.shape.Shape#isModifiable_ :boolean

Whether this shape is set modifiable. Defaults to true.
Type:
  • boolean
Source:

(private) xrx.shape.Shape#modifiable_ :xrx.shape.Modifiable

A modifiable helper shape.
Type:
Source:

(private) xrx.shape.Shape#selectable_ :xrx.shape.Selectable

A selectable helper shape.
Type:
Source:

xrx.shape.Shape#shapeGroup_ :xrx.shape.ShapeGroup

The shape group, if the shape belongs to a group.
Type:
Inherited From:
Source:

(private) xrx.shape.Shape#stroke_ :Object

Object describing the stroke style.
Type:
  • Object
Inherited From:
Source:

(private) xrx.shape.Shape#strokeChanged_ :Object

Object describing whether the stroke style did change since the last drawing.
Type:
  • Object
Inherited From:
Source:

xrx.shape.Shape#zoomFactor_ :number

The current zoom factor to realize constant line width and constant size of dragging elements.
Type:
  • number
Inherited From:
Source:

Methods

xrx.shape.Shape#disposeInternal()

Disposes this shape.
Source:

(private) xrx.shape.Shape#finishDrawing_()

Inherited From:
Source:

xrx.shape.Shape#getDrawing() → {xrx.drawing.Drawing}

Returns the parent drawing canvas of this shape.
Source:
Returns:
The parent drawing canvas.
Type
xrx.drawing.Drawing

xrx.shape.Shape#getEngineElement() → {xrx.engine.Element}

Returns the underlying engine element.
Inherited From:
Source:
Returns:
The engine element.
Type
xrx.engine.Element

xrx.shape.Shape#getFillColor() → {string}

Returns the fill color of this shape.
Inherited From:
Source:
Returns:
The fill color.
Type
string

xrx.shape.Shape#getFillOpacity() → {number}

Returns the fill opacity of this shape.
Inherited From:
Source:
Returns:
The fill opacity.
Type
number

(private) xrx.shape.Shape#getRenderingFillColor()

Inherited From:
Source:

(private) xrx.shape.Shape#getRenderingFillOpacity()

Inherited From:
Source:

(private) xrx.shape.Shape#getRenderingStrokeColor()

Inherited From:
Source:

xrx.shape.Shape#getRenderingStrokeWidth() → {number}

Returns the stroke width of this shape.
Inherited From:
Source:
Returns:
The stroke width.
Type
number

(private) xrx.shape.Shape#getShapeGroup() → {xrx.shape.ShapeGroup}

Returns the current shape group.
Inherited From:
Source:
Returns:
The shape group.
Type
xrx.shape.ShapeGroup

xrx.shape.Shape#getStrokeColor() → {string}

Returns the stroke color of this shape.
Inherited From:
Source:
Returns:
The stroke color.
Type
string

xrx.shape.Shape#getStrokeWidth() → {number}

Returns the stroke width of this shape.
Inherited From:
Source:
Returns:
The stroke width.
Type
number

xrx.shape.Shape#isModifiable() → {boolean}

Whether this shape is set modifiable.
Source:
Returns:
Is modifiable.
Type
boolean

(private) xrx.shape.Shape#setFillColor()

Inherited From:
Source:

(private) xrx.shape.Shape#setFillOpacity()

Inherited From:
Source:

xrx.shape.Shape#setModifiable(modifiable)

Sets whether this shape shall be modifiable or not. Defaults to true.
Parameters:
Name Type Description
modifiable boolean Whether modifiable or not.
Source:

(private) xrx.shape.Shape#setShapeGroup(shapeGroup)

Sets this shape to be part of a shape group.
Parameters:
Name Type Description
shapeGroup xrx.shape.ShapeGroup The shape group.
Inherited From:
Source:

(private) xrx.shape.Shape#setStrokeColor()

Inherited From:
Source:

(private) xrx.shape.Shape#setStrokeWidth()

Inherited From:
Source:

(private) xrx.shape.Shape#setStyle()

Inherited From:
Source:

(private) xrx.shape.Shape#setZoomFactor()

Inherited From:
Source:

(private) xrx.shape.Shape#startDrawing_()

Inherited From:
Source: