You must create a lasso selection before calling this API; otherwise the call fails.
static getLassoRect(): Promise<APIResponse<Rect>>;
Returns
Example
import { PluginCommAPI, type Rect } from 'sn-plugin-lib';
/**
* Example: get lasso rectangle.
*/
export async function exampleGetLassoRect(): Promise<Rect> {
const res = await PluginCommAPI.getLassoRect();
if (!res.success) {
throw new Error(res.error?.message ?? 'getLassoRect call failed');
}
return res.result;
}