(private) new xrx.shape.Geometry(drawing, geometry)
An abstract class representing the geometry
of a shape.
Parameters:
Name | Type | Description |
---|---|---|
drawing |
xrx.drawing.Drawing | The parent drawing canvas. |
geometry |
xrx.geometry.Geometry | The geometry object for this shape. |
Extends
Members
-
(private) xrx.shape.Geometry#creatable_ :xrx.shape.Creatable
-
A creatable helper shape.
Type:
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#ctm_ :goog.math.AffineTransform
-
The current transformation matrix of this shape.
Type:
- goog.math.AffineTransform
-
(private) xrx.shape.Geometry#drawing_ :xrx.drawing.Drawing
-
The parent drawing canvas.
Type:
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#fill_ :Object
-
Object describing the fill style.
Type:
- Object
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#fillChanged_ :Object
-
Object describing whether the fill style did change since the last drawing.
Type:
- Object
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#geometry_ :xrx.geometry.Geometry
-
Object describing the geometry of this shape.
Type:
-
xrx.shape.Geometry#getCreatable
-
Abstract function to be implemented by each shape class. Returns a creatable helper shape.
- Inherited From:
- Source:
-
xrx.shape.Geometry#getHoverable
-
Abstract function to be implemented by each shape class. Returns a hoverable helper shape.
- Inherited From:
- Source:
-
xrx.shape.Geometry#getModifiable
-
Abstract function to be implemented by each shape class. Returns a modifiable helper shape.
- Inherited From:
- Source:
-
xrx.shape.Geometry#getSelectable
-
Abstract function to be implemented by each shape class. Returns a selectable helper shape.
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#hasDom_ :boolean
-
Whether this shape has a DOM representation.
Type:
- boolean
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#hoverable_ :xrx.shape.Hoverable
-
A hoverable helper shape.
Type:
- Inherited From:
- Source:
-
xrx.shape.Geometry#isModifiable_ :boolean
-
Whether this shape is set modifiable. Defaults to true.
Type:
- boolean
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#modifiable_ :xrx.shape.Modifiable
-
A modifiable helper shape.
Type:
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#selectable_ :xrx.shape.Selectable
-
A selectable helper shape.
Type:
- Inherited From:
- Source:
-
xrx.shape.Geometry#shapeGroup_ :xrx.shape.ShapeGroup
-
The shape group, if the shape belongs to a group.
Type:
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#stroke_ :Object
-
Object describing the stroke style.
Type:
- Object
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#strokeChanged_ :Object
-
Object describing whether the stroke style did change since the last drawing.
Type:
- Object
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#zoomFactor_ :number
-
The current zoom factor that, e.g., influences stroke width.
Type:
- number
Methods
-
xrx.shape.Geometry#disposeInternal()
-
Disposes this geometry.
-
(private) xrx.shape.Geometry#finishDrawing_()
-
- Inherited From:
- Source:
-
xrx.shape.Geometry#getCoordsCopy() → {Array.<number>}
-
Returns a copy of the shape's coordinate array.
Returns:
A new coordinate array.- Type
- Array.<number>
-
xrx.shape.Geometry#getDrawing() → {xrx.drawing.Drawing}
-
Returns the parent drawing canvas of this shape.
- Inherited From:
- Source:
Returns:
The parent drawing canvas.- Type
- xrx.drawing.Drawing
-
xrx.shape.Geometry#getEngineElement() → {xrx.engine.Element}
-
Returns the underlying engine element.
- Inherited From:
- Source:
Returns:
The engine element.- Type
- xrx.engine.Element
-
xrx.shape.Geometry#getFillColor() → {string}
-
Returns the fill color of this shape.
- Inherited From:
- Source:
Returns:
The fill color.- Type
- string
-
xrx.shape.Geometry#getFillOpacity() → {number}
-
Returns the fill opacity of this shape.
- Inherited From:
- Source:
Returns:
The fill opacity.- Type
- number
-
xrx.shape.Geometry#getGeometry() → {xrx.geometry.Geometry}
-
Returns the geometry object of this shape.
Returns:
The geometry object. -
(private) xrx.shape.Geometry#getRenderingFillColor()
-
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#getRenderingFillOpacity()
-
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#getRenderingStrokeColor()
-
- Inherited From:
- Source:
-
xrx.shape.Geometry#getRenderingStrokeWidth() → {number}
-
Returns the stroke width of this shape.
- Inherited From:
- Source:
Returns:
The stroke width.- Type
- number
-
(private) xrx.shape.Geometry#getShapeGroup() → {xrx.shape.ShapeGroup}
-
Returns the current shape group.
- Inherited From:
- Source:
Returns:
The shape group.- Type
- xrx.shape.ShapeGroup
-
xrx.shape.Geometry#getStrokeColor() → {string}
-
Returns the stroke color of this shape.
- Inherited From:
- Source:
Returns:
The stroke color.- Type
- string
-
xrx.shape.Geometry#getStrokeWidth() → {number}
-
Returns the stroke width of this shape.
- Inherited From:
- Source:
Returns:
The stroke width.- Type
- number
-
xrx.shape.Geometry#isModifiable() → {boolean}
-
Whether this shape is set modifiable.
- Inherited From:
- Source:
Returns:
Is modifiable.- Type
- boolean
-
xrx.shape.Geometry#setCTM(matrix)
-
Sets a transformation matrix for this shape.
Parameters:
Name Type Description matrix
goog.math.AffineTransform The matrix. -
(private) xrx.shape.Geometry#setFillColor()
-
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#setFillOpacity()
-
- Inherited From:
- Source:
-
xrx.shape.Geometry#setModifiable(modifiable)
-
Sets whether this shape shall be modifiable or not. Defaults to true.
Parameters:
Name Type Description modifiable
boolean Whether modifiable or not. - Inherited From:
- Source:
-
(private) xrx.shape.Geometry#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.Geometry#setStrokeColor()
-
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#setStrokeWidth()
-
- Inherited From:
- Source:
-
(private) xrx.shape.Geometry#setStyle()
-
- Inherited From:
- Source:
-
xrx.shape.Geometry#setZoomFactor(factor)
-
Sets the current zoom factor, useful to realize shapes with constant size or constant stroke width.
Parameters:
Name Type Description factor
number The zoom factor. -
(private) xrx.shape.Geometry#startDrawing_()
-
- Inherited From:
- Source: