Home > ISCH_PrimitiveRectangle > getState_Rotation
ISCH_PrimitiveRectangle.getState_Rotation() method
获取属性状态:旋转角度
签名
typescript
function getState_Rotation(): number;1
返回值
number
旋转角度
示例
javascript
// 1. 创建一个旋转 45° 的测试矩形(第 6 参是旋转角,SCH 坐标单位 10mil)
const rect = await eda.sch_PrimitiveRectangle.create(400, 300, 200, 100, 0, 45);
// 2. 读取旋转角度
const rotation = rect.getState_Rotation();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.sch_PrimitiveRectangle.delete([rect.getState_PrimitiveId()]);
console.log('rotation:', rotation);1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10