DrawingAPI#
Interface DrawingAPI
Hierarchy
- DrawingAPI
Index
Methods
change Drawing
- change
Drawing(drawingId, properties): DrawingProperties -
Changes one or more properties of a Drawing with the specified id.
Parameters
-
drawingId: number
The id of the Drawing.
-
properties: DrawingProperties
The properties of the Drawing.
Returns DrawingProperties
An object with the changed properties.
-
create Drawing
- create
Drawing(data, properties?): number -
Creates a new Drawing from the Output of the ViewerDrawingAPI.
Parameters
-
data: ViewerDrawingResult
The data generated with the help of the ViewerDrawingAPI.
-
Optional
properties: DrawingPropertiesInitial properties of the created Drawing.
Returns number
The id of the newly created Drawing.
-
get Drawings
remove Drawing
- remove
Drawing(drawingId, safe?): RemoveState -
Removes a Drawing with the specified id. If a Drawing is part of a Snapshot the removal will fail with the State REFERENCED_BY_SNAPSHOT
Parameters
-
drawingId: number
The id of the to be removed Drawing.
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the Drawing is part of one or more Snapshots.
Returns RemoveState
-
request Drawing Data
- request
Drawing Data(drawingId): Promise<DrawingData> -
Returns the DrawingData for the specified Drawing id.
Parameters
-
drawingId: number
The id of the Drawing from which the data is requested.
Returns Promise<DrawingData>
The requested Drawing data.
-
The DrawingAPI provides basic functionalities to interact with 2D Drawings created with the help of the ViewerDrawingAPI.