Geometry is both “drawing” and “data”. In NOTE and DOC, geometry elements can be used for annotation, composition, or to present structured information alongside note content. This chapter covers three common capabilities: insert, read from lasso selection, and modify.
Insert Geometry
Call insertGeometry to insert a geometry element:
- In NOTE: inserted into the current page on the current layer of the currently opened note
- In DOC: inserted into the current page of the currently opened document
The type field values and data structure are defined in Geometry. Point coordinates use pixel coordinates.
Get Lasso Geometries
After selecting geometry elements with the lasso tool, call getLassoGeometries to read the selected geometry list.
result is a list of Geometry.
You must create a lasso selection before calling this API. If there are no geometry elements in the lasso selection, the returned array is empty.
Modify Lasso Geometry
You can modify the currently lasso-selected geometry, for example adjust a circle radius or change a line point set.
Call modifyLassoGeometry to apply the modification:
This operation requires the current lasso selection to contain exactly one geometry element. Calling it with no lasso selection or multiple geometries will fail.