Home > ISCH_PrimitiveText > getState_TextColor
ISCH_PrimitiveText.getState_TextColor() method
获取属性状态:文本颜色
签名
typescript
function getState_TextColor(): string | null;1
返回值
string | null
文本颜色
示例
javascript
// 1. 创建一个红色文字的测试文本(第 5 参是文字颜色)
const text = await eda.sch_PrimitiveText.create(400, 300, '嘉立创示例_警示', 0, '#FF0000');
// 2. 读取文字颜色
const textColor = text.getState_TextColor();
// 3. 清理测试图元(查询类案例不留测试对象)
await eda.sch_PrimitiveText.delete([text.getState_PrimitiveId()]);
console.log('textColor:', textColor);1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10