Home > SCH_PrimitiveText > create
SCH_PrimitiveText.create() 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
create(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 |
---|---|---|
x | number | 坐标 X |
y | number | 坐标 Y |
content | string | 文本内容 |
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
文本图元对象