MemberState interface 参考

  • HarmonyOS

更新时间不可用

详细描述

适用版本:@shengwang/whiteboard 0.2.11。

白板工具状态,包含当前教具、颜色、线宽和文本等属性。

可从 @shengwang/whiteboard 直接导入 MemberState。仅用于类型声明,不能作为构造函数调用 new。

类型结构(源码声明)

下方源码文件的 export 声明不等同于 SDK 包入口导出;业务导入方式以上方说明为准。

Text
export interface MemberState
currentApplianceNamecurrentApplianceName?: Appliance
shapeTypeshapeType?: ShapeType
strokeColorstrokeColor?: [number, number, number]
strokeWidthstrokeWidth?: number
textSizetextSize?: number
textColortextColor?: [number, number, number]
表格内容超出当前宽度,可横向滚动查看更多列。

变量说明

currentApplianceName

Text
currentApplianceName?: Appliance

白板工具名称

shapeType

Text
shapeType?: ShapeType

图形工具的类型。

strokeColor

Text
strokeColor?: [number, number, number]

线条颜色,为 RGB 格式,例如,[0, 0, 255] 表示蓝色。

strokeWidth

Text
strokeWidth?: number

线条粗细。

textSize

Text
textSize?: number

字体大小。Chrome 浏览器对于小于 12 的字体会自动调整为 12。

textColor

Text
textColor?: [number, number, number]

文本颜色,为 RGB 格式,例如,[0, 0, 255] 表示蓝色。不设置情况与 strokeColor 使用相同

这个页面有帮助吗?