Home > PCB_Primitive > getPrimitivesBBox
PCB_Primitive.getPrimitivesBBox() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
获取图元的 BBox
Signature
typescript
getPrimitivesBBox(primitiveIds: Array<string | IPCB_Primitive>): Promise<{
minX: number;
minY: number;
maxX: number;
maxY: number;
} | undefined>;
1
2
3
4
5
6
2
3
4
5
6
Parameters
Parameter | Type | Description |
---|---|---|
primitiveIds | Array<string | IPCB_Primitive> | 图元 ID 数组或图元对象数组 |
Returns
Promise<{ minX: number; minY: number; maxX: number; maxY: number; } | undefined>
图元的 BBox,如若图元不存在或没有 BBox,将会返回 undefined
的结果