Home > SCH_PrimitiveText > modify
SCH_PrimitiveText.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 | ISCH_PrimitiveText, x?: number, y?: number, content?: string, rotation?: number, textColor?: string | null, fontName?: string | null, fontSize?: number | null, bold?: boolean, italic?: boolean, underLine?: boolean, alignMode?: number): ISCH_PrimitiveText | undefined;
1
Parameters
Parameter | Type | Description |
---|---|---|
primitiveId | string | ISCH_PrimitiveText | 图元 ID |
x | number | (Optional) 坐标 X |
y | number | (Optional) 坐标 Y |
content | string | (Optional) 文本内容 |
rotation | number | (Optional) 旋转角度,可选 |
textColor | string | null | (Optional) 文本颜色, |
fontName | string | null | (Optional) 字体名称, |
fontSize | number | null | (Optional) 字体大小, |
bold | boolean | (Optional) 是否加粗 |
italic | boolean | (Optional) 是否斜体 |
underLine | boolean | (Optional) 是否加下划线 |
alignMode | number | (Optional) 对齐模式, |
Returns
ISCH_PrimitiveText | undefined
文本图元对象