Home > PCB_PrimitiveObject > modify
PCB_PrimitiveObject.modify() 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.
修改二进制内嵌对象
Signature
typescript
modify(primitiveId: string | IPCB_PrimitiveObject, property: {
layer?: TPCB_LayersOfObject;
topLeftX?: number;
topLeftY?: number;
binaryData?: string;
width?: number;
height?: number;
rotation?: number;
mirror?: boolean;
fileName?: string;
primitiveLock?: boolean;
}): Promise<IPCB_PrimitiveObject | undefined>;
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Parameters
Parameter | Type | Description |
---|---|---|
primitiveId | string | IPCB_PrimitiveObject | 图元 ID |
property | { layer?: TPCB_LayersOfObject; topLeftX?: number; topLeftY?: number; binaryData?: string; width?: number; height?: number; rotation?: number; mirror?: boolean; fileName?: string; primitiveLock?: boolean; } | 修改参数 |
Returns
Promise<IPCB_PrimitiveObject | undefined>
二进制内嵌对象图元对象,undefined
表示修改失败