Home > IPCB_PrimitiveImage > getState_HorizonMirror
IPCB_PrimitiveImage.getState_HorizonMirror() method
Get the property state: whether it is horizontally mirrored
Signature
typescript
function getState_HorizonMirror(): boolean;1
Returns
boolean
Whether it is horizontally mirrored
Example
javascript
// 1. 生成本次运行专用的坐标,创建一个未镜像的顶层图像
const x = 2000 + Math.floor(Math.random() * 100000);
const y = 2000 + Math.floor(Math.random() * 100000);
const complexPolygon = eda.pcb_MathPolygon.createComplexPolygon([0, 0, 'L', 200, 0, 200, 150, 0, 150]);
const image = await eda.pcb_PrimitiveImage.create(x, y, complexPolygon, 1, 400, 300, 0, false, false);
// 2. 读取镜像状态
const horizonMirror = image.getState_HorizonMirror();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.pcb_PrimitiveImage.delete([image.getState_PrimitiveId()]);
console.log('horizonMirror:', horizonMirror);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13