MemberState interface 参考
- HarmonyOS
更新时间不可用
详细描述
适用版本:@shengwang/whiteboard 0.2.11。
白板工具状态,包含当前教具、颜色、线宽和文本等属性。
可从 @shengwang/whiteboard 直接导入 MemberState。仅用于类型声明,不能作为构造函数调用 new。
类型结构(源码声明)
下方源码文件的 export 声明不等同于 SDK 包入口导出;业务导入方式以上方说明为准。
export interface MemberState| currentApplianceName | currentApplianceName?: Appliance |
|---|---|
| shapeType | shapeType?: ShapeType |
| strokeColor | strokeColor?: [number, number, number] |
| strokeWidth | strokeWidth?: number |
| textSize | textSize?: number |
| textColor | textColor?: [number, number, number] |
变量说明
currentApplianceName
currentApplianceName?: Appliance白板工具名称
shapeType
shapeType?: ShapeType图形工具的类型。
strokeColor
strokeColor?: [number, number, number]线条颜色,为 RGB 格式,例如,[0, 0, 255] 表示蓝色。
strokeWidth
strokeWidth?: number线条粗细。
textSize
textSize?: number字体大小。Chrome 浏览器对于小于 12 的字体会自动调整为 12。
textColor
textColor?: [number, number, number]文本颜色,为 RGB 格式,例如,[0, 0, 255] 表示蓝色。不设置情况与 strokeColor 使用相同