DrawingAPI#
Interface DrawingAPI
Hierarchy
- DrawingAPI
Index
Methods
change Drawing
- change
Drawing(drawingId: number, properties: DrawingProperties): 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: ViewerDrawingResult, properties?: DrawingProperties): 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: number, force?: boolean): RemoveDrawingState -
Removes a Drawing with the specified id. If a Drawing is part of a Snapshot the removal will fail with the State RemoveDrawingState.PART_OF_SNAPSHOT
Parameters
-
drawingId: number
The id of the to be removed Drawing.
-
Optional
force: booleanForces the removal of the Drawing even if the Drawing is part of one or more Snapshots.
Returns RemoveDrawingState
-
request Drawing Data
- request
Drawing Data(drawingId: number): 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.