Android(Java)[v1.7.5.0]
| Public 成员函数 | 所有成员列表
com.pano.rtc.api.RtcWhiteboard接口 参考

RtcWhiteboard 接口类对应用程序提供了所有的白板相关方法。 更多...

interface  Callback
 PANO白板引擎回调接口。 更多...
 

Public 成员函数

QResult setCallback (Callback callback)
 设置白板回调函数,用以接收白板事件消息
 
QResult setRoleType (WBRoleType role)
 设置白板角色类型。 更多...
 
QResult open (RtcWbView view)
 
QResult open (PanoCoursePageView view)
 打开白板。 更多...
 
QResult close ()
 关闭白板。 更多...
 
QResult leave ()
 离开白板 更多...
 
QResult stop ()
 停止白板 更多...
 
QResult importFrom (String filename)
 导入dump文件到白板 更多...
 
QResult exportTo (String filename)
 导出白板到文件 更多...
 
String getCurrentWhiteboardId ()
 获取当前白板Id 更多...
 
WBToolType getToolType ()
 获取工具类型 更多...
 
int getCurrentPageNumber ()
 获取当前白板页码 更多...
 
int getTotalNumberOfPages ()
 获取总白板页码数 更多...
 
float getCurrentScaleFactor ()
 获取当前白板视图的缩放比例 更多...
 
QResult setCurrentScaleFactor (float scale)
 设置当前白板视图的缩放比例 更多...
 
float getCurrentMinScaleFactor ()
 获取当前白板视图的最小缩放比例 更多...
 
float getCurrentMaxScaleFactor ()
 获取当前白板视图的最大缩放比例 更多...
 
QResult setBackgroundImage (String imageUrl)
 设置白板背景图片 更多...
 
QResult setBackgroundImage (String imageUrl, int pageNo)
 设置白板指定页背景图片 更多...
 
QResult setBackgroundImageScalingMode (WBImageScalingMode mode)
 设置白板背景图缩放模式 更多...
 
QResult setToolType (WBToolType type)
 设置工具类型 更多...
 
RtcWbView getAttachedRtcWbView ()
 获取绑定的RtcWbView 更多...
 
PanoCoursePageView getAttachedCoursePageView ()
 获取绑定的PanoCoursePageView 更多...
 
QResult setLineWidth (int size)
 设置线宽 更多...
 
QResult setFillType (WBFillType type)
 设置填充类型 更多...
 
QResult setFillColor (int color)
 设置填充颜色。 更多...
 
QResult setFillColor (float r, float g, float b, float a)
 设置填充颜色 更多...
 
QResult setForegroundColor (int color)
 设置白板前景色。 更多...
 
QResult setForegroundColor (float r, float g, float b, float a)
 设置白板前景色。 更多...
 
QResult setBackgroundColor (int color)
 设置白板背景色。 更多...
 
QResult setBackgroundColor (float r, float g, float b, float a)
 设置白板背景色。 更多...
 
QResult setFontStyle (WBFontStyle style)
 设置字体样式 更多...
 
QResult setFontSize (int size)
 设置字体大小 更多...
 
QResult addStamp (WBStamp stamp)
 添加图章资源 更多...
 
QResult setStamp (String stampId)
 设置图章资源 更多...
 
QResult undo ()
 撤消上一次操作 更多...
 
QResult redo ()
 重做白板的上一次被撤销操作 更多...
 
QResult addPage (boolean autoSwitch)
 添加一个新页面到最后 更多...
 
QResult insertPage (int pageNo, boolean autoSwitch)
 添加一个新页面到 pageNo 之后 更多...
 
QResult removePage (int pageNo)
 删除页 pageNo 更多...
 
QResult removePage (int pageNo, boolean switchNext)
 删除页 pageNo 更多...
 
QResult gotoPage (int pageNo)
 切换到页 pageNo 更多...
 
QResult nextPage ()
 切换到下一页 更多...
 
QResult prevPage ()
 切换到前一页 更多...
 
QResult nextStep ()
 执行H5文件下一步 更多...
 
QResult prevStep ()
 执行H5文件上一步 更多...
 
QResult addImageFile (String imageUrl)
 添加图片到当前白板页 更多...
 
QResult addAudioFile (String mediaUrl)
 添加音频媒体文件到当前白板页 更多...
 
QResult addVideoFile (String mediaUrl)
 添加视频媒体文件到当前白板页 更多...
 
String addBackgroundImages (List< String > urls)
 添加指定数量的背景图到当前白板文件 更多...
 
String addH5File (String url, String downloadUrl)
 添加H5文件URL到当前白板文件作为背景 更多...
 
String addDoc (WBDocContents contents)
 添加新的白板文件 更多...
 
String addDoc (WBDocExtHtml contents)
 使用外部Html添加新的白板文件 更多...
 
String addDoc (WBDocExtContents contents)
 基于外部内容添加新的白板文件 更多...
 
String createDoc (List< String > imageUrls)
 导入指定数量的背景图并创建新的白板文件 更多...
 
String createDoc (String filePath)
 上传本地需转码的文件并创建新的白板文件 更多...
 
String createDoc (String filePath, WBDocConvertConfig param)
 上传本地需转码的文件并创建新的白板文件 更多...
 
QResult deleteDoc (String fileId)
 删除白板文件 更多...
 
QResult switchDoc (String fileId)
 切换白板文件 更多...
 
QResult saveDocToImages (String fileId, String outputDir)
 保存白板文件为多张图片。每个白板页存为一张图 图像名称格式为whiteboard_[fileId]_[page number].png, 例如:whiteboard_default_1.png 更多...
 
List< String > enumerateFiles ()
 枚举白板文件 更多...
 
String getCurrentFileId ()
 获取当前白板文件ID 更多...
 
WBDocInfo getFileInfo (String fileId)
 获取指定白板文件ID的白板文件信息 更多...
 
QResult sendMessageToExternalHtml (String fileId, String msg)
 发送自定义消息到外部HTML页面 更多...
 
QResult clearContents (boolean curPage, WBClearType type)
 清除白板内容,需要 ADMIN 角色才可调用成功 更多...
 
QResult clearUserContents (long userId, boolean curPage, WBClearType type)
 清除指定用户的白板内容 更多...
 
QResult clearDocContents (String fileId, WBClearType type)
 清除指定白板文件的内容 更多...
 
QResult snapshot (WBSnapshotMode mode, String outputDir)
 保存白板内容到图像。 更多...
 
QResult initVision (WBVisionConfig config)
 设置白板初始大小 更多...
 
QResult resetVision ()
 重置当前页视角 更多...
 
QResult startShareVision ()
 开始共享视角 更多...
 
QResult stopShareVision ()
 结束共享视角 更多...
 
QResult startFollowVision ()
 开始跟随视角 更多...
 
QResult stopFollowVision ()
 结束跟随视角 更多...
 
QResult syncVision ()
 同步当前页视角 更多...
 
QResult sendMessage (long userId, byte[] msg)
 发送消息给某个指定用户。 更多...
 
QResult broadcastMessage (byte[] msg)
 广播消息给所有用户。 更多...
 
QResult setFileCachePath (String path)
 白板文件缓存路径 更多...
 
QResult enableUIResponse (boolean enable)
 是否启用白板响应UI事件。默认启用 更多...
 
QResult enableShowDraws (boolean enable)
 显示或隐藏白板涂鸦。默认显示 更多...
 
QResult enableScaleMove (boolean enable)
 允许白板画布缩放和移动手势。默认打开 更多...
 
QResult enableAutoSelected (boolean enable)
 设置图片或音视频对象默认选中状态。默认打开 更多...
 
QResult enableCursorPosSync (boolean enable)
 设置是否同步光标或画笔位置。默认关闭 更多...
 
QResult enableShowRemoteCursor (boolean enable)
 设置是否显示远端光标或画笔。默认关闭 更多...
 

详细描述

RtcWhiteboard 接口类对应用程序提供了所有的白板相关方法。

RtcWhiteboard 对象可以通过 RtcEngine 实例获取。

成员函数说明

◆ addAudioFile()

QResult com.pano.rtc.api.RtcWhiteboard.addAudioFile ( String  mediaUrl)

添加音频媒体文件到当前白板页

参数
mediaUrl媒体 URL,可为本地路径或远程 URL
返回
  • OK: 成功
  • Others: 失败

◆ addBackgroundImages()

String com.pano.rtc.api.RtcWhiteboard.addBackgroundImages ( List< String >  urls)

添加指定数量的背景图到当前白板文件

参数
urls背景图url数组(仅支持远程URL)
返回
  • 当前白板文件ID,如果失败返回空串
注解
PanoWhiteboard创建时会生成白板文件ID为"default"的白板文件

◆ addDoc() [1/3]

String com.pano.rtc.api.RtcWhiteboard.addDoc ( WBDocContents  contents)

添加新的白板文件

参数
contents根据转码结果指定的白板文件内容
返回
  • 当前白板文件ID,如果失败返回空串
注解
PanoWhiteboard创建时会生成白板文件ID为"default"的白板文件

◆ addDoc() [2/3]

String com.pano.rtc.api.RtcWhiteboard.addDoc ( WBDocExtContents  contents)

基于外部内容添加新的白板文件

参数
contents外部白板文件内容
返回
  • 当前白板文件ID,如果失败返回nullptr
注解
PanoWhiteboard创建时会生成白板文件ID为"default"的白板文件

◆ addDoc() [3/3]

String com.pano.rtc.api.RtcWhiteboard.addDoc ( WBDocExtHtml  contents)

使用外部Html添加新的白板文件

参数
contents外部Html的白板文件内容
返回
  • 当前白板文件ID,如果失败返回空串
注解
PanoWhiteboard创建时会生成白板文件ID为"default"的白板文件

◆ addH5File()

String com.pano.rtc.api.RtcWhiteboard.addH5File ( String  url,
String  downloadUrl 
)

添加H5文件URL到当前白板文件作为背景

参数
url网络URL(仅支持远程URL)
downloadUrlH5文件的下载URL, 所有文件需要打包为zip文件
返回
  • 当前白板文件ID,如果失败返回空串
注解
PanoWhiteboard创建时会生成白板文件ID为"default"的白板文件

◆ addImageFile()

QResult com.pano.rtc.api.RtcWhiteboard.addImageFile ( String  imageUrl)

添加图片到当前白板页

参数
imageUrl图像 URL,可为本地路径或远程 URL
返回
  • OK: 成功
  • Others: 失败

◆ addPage()

QResult com.pano.rtc.api.RtcWhiteboard.addPage ( boolean  autoSwitch)

添加一个新页面到最后

参数
autoSwitch自动切换到新添加的页面
返回
  • OK: 成功
  • Others: 失败

◆ addStamp()

QResult com.pano.rtc.api.RtcWhiteboard.addStamp ( WBStamp  stamp)

添加图章资源

参数
stamp图章资源
返回
  • OK: 成功
  • Others: 失败

◆ addVideoFile()

QResult com.pano.rtc.api.RtcWhiteboard.addVideoFile ( String  mediaUrl)

添加视频媒体文件到当前白板页

参数
mediaUrl媒体 URL,可为本地路径或远程 URL
返回
  • OK: 成功
  • Others: 失败

◆ broadcastMessage()

QResult com.pano.rtc.api.RtcWhiteboard.broadcastMessage ( byte[]  msg)

广播消息给所有用户。

参数
msg要广播的消息,最大为 16KB
返回
  • OK: 成功
  • Others: 失败

◆ clearContents()

QResult com.pano.rtc.api.RtcWhiteboard.clearContents ( boolean  curPage,
WBClearType  type 
)

清除白板内容,需要 ADMIN 角色才可调用成功

参数
curPagetrue: 只清除当前页内容;false: 清除所有页内容
typeWBClearType 枚举类型
返回
  • OK: 成功
  • NO_PRIVILEGE: 没有权限
  • Others: 失败
注解
此接口只有 ADMIN 角色才可调用

◆ clearDocContents()

QResult com.pano.rtc.api.RtcWhiteboard.clearDocContents ( String  fileId,
WBClearType  type 
)

清除指定白板文件的内容

参数
fileId白板文件ID
typeWBClearType 枚举类型
返回
  • OK: 成功
  • NO_PRIVILEGE: 没有权限
  • Others: 失败
注解
只有 ADMIN 角色才可以调用

◆ clearUserContents()

QResult com.pano.rtc.api.RtcWhiteboard.clearUserContents ( long  userId,
boolean  curPage,
WBClearType  type 
)

清除指定用户的白板内容

参数
userId用户ID
curPagetrue: 只清除当前页内容;false: 清除所有页内容
typeWBClearType 枚举类型
返回
  • OK: 成功
  • NO_PRIVILEGE: 没有权限
  • Others: 失败
注解
只有 ADMIN 角色才可以清除非本地用户的内容

◆ close()

QResult com.pano.rtc.api.RtcWhiteboard.close ( )

关闭白板。

返回
  • OK: 成功
  • Others: 失败

◆ createDoc() [1/3]

String com.pano.rtc.api.RtcWhiteboard.createDoc ( List< String >  imageUrls)

导入指定数量的背景图并创建新的白板文件

参数
imageUrls背景图url数组(仅支持远程URL)
返回
  • 新创建的白板文件ID,如果失败返回空串
注解
PanoWhiteboard 创建时会生成白板文件ID为"default"的白板文件

◆ createDoc() [2/3]

String com.pano.rtc.api.RtcWhiteboard.createDoc ( String  filePath)

上传本地需转码的文件并创建新的白板文件

参数
filePath本地文件路径
返回
  • 新创建的白板文件ID,如果失败返回空串
注解
PanoWhiteboard 创建时会生成白板文件ID为"default"的白板文件 最大文件大小取决于文档转码RESTful API

◆ createDoc() [3/3]

String com.pano.rtc.api.RtcWhiteboard.createDoc ( String  filePath,
WBDocConvertConfig  param 
)

上传本地需转码的文件并创建新的白板文件

参数
filePath本地文件路径
param转码参数
返回
  • 新创建的白板文件ID,如果失败返回空串
注解
PanoWhiteboard 创建时会生成白板文件ID为"default"的白板文件 转码类型为H5时,仅支持后缀为.ppt, .pptx的文件 最大文件大小取决于文档转码RESTful API

◆ deleteDoc()

QResult com.pano.rtc.api.RtcWhiteboard.deleteDoc ( String  fileId)

删除白板文件

参数
fileId白板文件ID
返回
  • OK: 成功
  • Others: 失败
注解
"default" 白板文件不能被删除

◆ enableAutoSelected()

QResult com.pano.rtc.api.RtcWhiteboard.enableAutoSelected ( boolean  enable)

设置图片或音视频对象默认选中状态。默认打开

参数
enable是否打开.
返回
  • OK: 成功
  • Others: 失败

◆ enableCursorPosSync()

QResult com.pano.rtc.api.RtcWhiteboard.enableCursorPosSync ( boolean  enable)

设置是否同步光标或画笔位置。默认关闭

参数
enable是否打开.
返回
  • OK: 成功
  • Others: 失败

◆ enableScaleMove()

QResult com.pano.rtc.api.RtcWhiteboard.enableScaleMove ( boolean  enable)

允许白板画布缩放和移动手势。默认打开

参数
enable是否打开.
返回
  • OK: 成功
  • Others: 失败
注解
setCurrentScaleFactor 不受此选项影响

◆ enableShowDraws()

QResult com.pano.rtc.api.RtcWhiteboard.enableShowDraws ( boolean  enable)

显示或隐藏白板涂鸦。默认显示

参数
enable是否显示.
返回
  • OK: 成功
  • Others: 失败
注解
背景图和H5内容不受此选项影响

◆ enableShowRemoteCursor()

QResult com.pano.rtc.api.RtcWhiteboard.enableShowRemoteCursor ( boolean  enable)

设置是否显示远端光标或画笔。默认关闭

参数
enable是否打开.
返回
  • OK: 成功
  • Others: 失败

◆ enableUIResponse()

QResult com.pano.rtc.api.RtcWhiteboard.enableUIResponse ( boolean  enable)

是否启用白板响应UI事件。默认启用

参数
enable是否启用.
返回
  • OK: 成功
  • Others: 失败

◆ enumerateFiles()

List< String > com.pano.rtc.api.RtcWhiteboard.enumerateFiles ( )

枚举白板文件

返回
fileId数组

◆ exportTo()

QResult com.pano.rtc.api.RtcWhiteboard.exportTo ( String  filename)

导出白板到文件

参数
filename导出文件
返回
  • OK: 成功
  • Others: 失败

◆ getAttachedCoursePageView()

PanoCoursePageView com.pano.rtc.api.RtcWhiteboard.getAttachedCoursePageView ( )

获取绑定的PanoCoursePageView

返回
  • 绑定的PanoCoursePageView

◆ getAttachedRtcWbView()

RtcWbView com.pano.rtc.api.RtcWhiteboard.getAttachedRtcWbView ( )

获取绑定的RtcWbView

返回
  • 绑定的RtcWbView

◆ getCurrentFileId()

String com.pano.rtc.api.RtcWhiteboard.getCurrentFileId ( )

获取当前白板文件ID

返回
  • 当前白板文件ID, 失败则返回nullptr

◆ getCurrentMaxScaleFactor()

float com.pano.rtc.api.RtcWhiteboard.getCurrentMaxScaleFactor ( )

获取当前白板视图的最大缩放比例

返回
缩放比例值

◆ getCurrentMinScaleFactor()

float com.pano.rtc.api.RtcWhiteboard.getCurrentMinScaleFactor ( )

获取当前白板视图的最小缩放比例

返回
缩放比例值

◆ getCurrentPageNumber()

int com.pano.rtc.api.RtcWhiteboard.getCurrentPageNumber ( )

获取当前白板页码

返回
  • kInvalidPageNumber: 白板未打开
  • Others: 白板页码

◆ getCurrentScaleFactor()

float com.pano.rtc.api.RtcWhiteboard.getCurrentScaleFactor ( )

获取当前白板视图的缩放比例

返回
缩放比例值

◆ getCurrentWhiteboardId()

String com.pano.rtc.api.RtcWhiteboard.getCurrentWhiteboardId ( )

获取当前白板Id

返回
  • 白板Id

◆ getFileInfo()

WBDocInfo com.pano.rtc.api.RtcWhiteboard.getFileInfo ( String  fileId)

获取指定白板文件ID的白板文件信息

参数
fileId白板文件ID
返回
  • 白板文件信息

◆ getToolType()

WBToolType com.pano.rtc.api.RtcWhiteboard.getToolType ( )

获取工具类型

返回
  • 工具类型

◆ getTotalNumberOfPages()

int com.pano.rtc.api.RtcWhiteboard.getTotalNumberOfPages ( )

获取总白板页码数

返回
页码数

◆ gotoPage()

QResult com.pano.rtc.api.RtcWhiteboard.gotoPage ( int  pageNo)

切换到页 pageNo

参数
pageNo页码
返回
  • OK: 成功
  • Others: 失败

◆ importFrom()

QResult com.pano.rtc.api.RtcWhiteboard.importFrom ( String  filename)

导入dump文件到白板

参数
filename导入文件
返回
  • OK: 成功
  • Others: 失败

◆ initVision()

QResult com.pano.rtc.api.RtcWhiteboard.initVision ( WBVisionConfig  config)

设置白板初始大小

返回
  • OK: 成功
  • Others: 失败

◆ insertPage()

QResult com.pano.rtc.api.RtcWhiteboard.insertPage ( int  pageNo,
boolean  autoSwitch 
)

添加一个新页面到 pageNo 之后

参数
pageNo页码
autoSwitch自动切换到新添加的页面
返回
  • OK: 成功
  • Others: 失败

◆ leave()

QResult com.pano.rtc.api.RtcWhiteboard.leave ( )

离开白板

返回
  • OK: 成功
  • Others: 失败

◆ nextPage()

QResult com.pano.rtc.api.RtcWhiteboard.nextPage ( )

切换到下一页

返回
  • OK: 成功
  • Others: 失败

◆ nextStep()

QResult com.pano.rtc.api.RtcWhiteboard.nextStep ( )

执行H5文件下一步

返回
  • OK: 成功
  • Others: 失败

◆ open()

QResult com.pano.rtc.api.RtcWhiteboard.open ( PanoCoursePageView  view)

打开白板。

参数
view客户提供的白板显示视图。
返回
  • OK: 成功
  • Others: 失败

◆ prevPage()

QResult com.pano.rtc.api.RtcWhiteboard.prevPage ( )

切换到前一页

返回
  • OK: 成功
  • Others: 失败

◆ prevStep()

QResult com.pano.rtc.api.RtcWhiteboard.prevStep ( )

执行H5文件上一步

返回
  • OK: 成功
  • Others: 失败

◆ redo()

QResult com.pano.rtc.api.RtcWhiteboard.redo ( )

重做白板的上一次被撤销操作

返回
  • OK: 成功
  • Others: 失败

◆ removePage() [1/2]

QResult com.pano.rtc.api.RtcWhiteboard.removePage ( int  pageNo)

删除页 pageNo

参数
pageNo被删除的页码
返回
  • OK: 成功
  • Others: 失败

◆ removePage() [2/2]

QResult com.pano.rtc.api.RtcWhiteboard.removePage ( int  pageNo,
boolean  switchNext 
)

删除页 pageNo

参数
pageNo被删除的页码
switchNext切换到删除页的下一页.
注解
删除页的默认行为是切换到删除页的前一页。设置switchNext为true改为切换到删除页的下一页。
返回
  • OK: 成功
  • Others: 失败

◆ resetVision()

QResult com.pano.rtc.api.RtcWhiteboard.resetVision ( )

重置当前页视角

返回
  • OK: 成功
  • Others: 失败

◆ saveDocToImages()

QResult com.pano.rtc.api.RtcWhiteboard.saveDocToImages ( String  fileId,
String  outputDir 
)

保存白板文件为多张图片。每个白板页存为一张图 图像名称格式为whiteboard_[fileId]_[page number].png, 例如:whiteboard_default_1.png

参数
fileId白板文件ID
outputDir输出路径
返回
  • OK: 成功
  • Others: 失败
注解
不支持H5文档

◆ sendMessage()

QResult com.pano.rtc.api.RtcWhiteboard.sendMessage ( long  userId,
byte[]  msg 
)

发送消息给某个指定用户。

参数
userId用户 ID。
msg要发送的消息,最大为 16KB
返回
  • OK: 成功
  • Others: 失败

◆ sendMessageToExternalHtml()

QResult com.pano.rtc.api.RtcWhiteboard.sendMessageToExternalHtml ( String  fileId,
String  msg 
)

发送自定义消息到外部HTML页面

参数
fileId白板文件ID
msg自定义消息
返回
  • OK: 成功
  • Others: 失败
注解
只支持外部HTML

◆ setBackgroundColor() [1/2]

QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundColor ( float  r,
float  g,
float  b,
float  a 
)

设置白板背景色。

参数
rg b a 背景颜色值。有效值范围:[0, 1]。
返回
  • OK: 成功
  • Others: 失败

◆ setBackgroundColor() [2/2]

QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundColor ( int  color)

设置白板背景色。

参数
color背景颜色值。
返回
  • OK: 成功
  • Others: 失败

◆ setBackgroundImage() [1/2]

QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundImage ( String  imageUrl)

设置白板背景图片

参数
imageUrl背景图 URL,可为本地路径或远程 URL
返回
  • OK: 成功
  • Others: 失败

◆ setBackgroundImage() [2/2]

QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundImage ( String  imageUrl,
int  pageNo 
)

设置白板指定页背景图片

参数
imageUrl背景图 URL,可为本地路径或远程 URL
pageNo白板页码
返回
  • OK: 成功
  • Others: 失败

◆ setBackgroundImageScalingMode()

QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundImageScalingMode ( WBImageScalingMode  mode)

设置白板背景图缩放模式

参数
mode背景图缩放模式
返回
  • OK: 成功
  • Others: 失败

◆ setCurrentScaleFactor()

QResult com.pano.rtc.api.RtcWhiteboard.setCurrentScaleFactor ( float  scale)

设置当前白板视图的缩放比例

参数
scale缩放比例值。有效值范围 [0.1, 5.0]
返回
  • OK: 成功
  • Others: 失败

◆ setFileCachePath()

QResult com.pano.rtc.api.RtcWhiteboard.setFileCachePath ( String  path)

白板文件缓存路径

参数
path缓存路径
返回
  • OK: 成功
  • Others: 失败

◆ setFillColor() [1/2]

QResult com.pano.rtc.api.RtcWhiteboard.setFillColor ( float  r,
float  g,
float  b,
float  a 
)

设置填充颜色

参数
rg b a 填充颜色值。有效值范围:[0, 1]。
返回
  • OK: 成功
  • Others: 失败
注解
填充类型为WbFileType::COLOR时, 此设置方能起效。
返回
  • OK: 成功
  • Others: 失败

◆ setFillColor() [2/2]

QResult com.pano.rtc.api.RtcWhiteboard.setFillColor ( int  color)

设置填充颜色。

参数
color填充颜色值。
返回
  • OK: 成功
  • Others: 失败

◆ setFillType()

QResult com.pano.rtc.api.RtcWhiteboard.setFillType ( WBFillType  type)

设置填充类型

参数
type填充类型
返回
  • OK: 成功
  • Others: 失败

◆ setFontSize()

QResult com.pano.rtc.api.RtcWhiteboard.setFontSize ( int  size)

设置字体大小

参数
size字体大小,有效值范围:[10, 96],默认值:16。
返回
  • OK: 成功
  • Others: 失败

◆ setFontStyle()

QResult com.pano.rtc.api.RtcWhiteboard.setFontStyle ( WBFontStyle  style)

设置字体样式

参数
style字体样式
返回
  • OK: 成功
  • Others: 失败

◆ setForegroundColor() [1/2]

QResult com.pano.rtc.api.RtcWhiteboard.setForegroundColor ( float  r,
float  g,
float  b,
float  a 
)

设置白板前景色。

参数
rg b a 前景颜色值。有效值范围:[0, 1]。
返回
  • OK: 成功
  • Others: 失败

◆ setForegroundColor() [2/2]

QResult com.pano.rtc.api.RtcWhiteboard.setForegroundColor ( int  color)

设置白板前景色。

参数
color前景颜色值。
返回
  • OK: 成功
  • Others: 失败

◆ setLineWidth()

QResult com.pano.rtc.api.RtcWhiteboard.setLineWidth ( int  size)

设置线宽

参数
size线宽,有效值范围:[1, 20],默认值:1。
返回
  • OK: 成功
  • Others: 失败

◆ setRoleType()

QResult com.pano.rtc.api.RtcWhiteboard.setRoleType ( WBRoleType  role)

设置白板角色类型。

参数
role白板角色。

◆ setStamp()

QResult com.pano.rtc.api.RtcWhiteboard.setStamp ( String  stampId)

设置图章资源

参数
stampId图章资源ID
返回
  • OK: 成功
  • Others: 失败

◆ setToolType()

QResult com.pano.rtc.api.RtcWhiteboard.setToolType ( WBToolType  type)

设置工具类型

参数
type工具类型
返回
  • OK: 成功
  • Others: 失败

◆ snapshot()

QResult com.pano.rtc.api.RtcWhiteboard.snapshot ( WBSnapshotMode  mode,
String  outputDir 
)

保存白板内容到图像。

参数
mode快照模式
outputDir输出路径
返回
  • OK: 成功
  • Others: 失败
注解
快照结果和图像文件名通过回调函数onSnapshotComplete返回

◆ startFollowVision()

QResult com.pano.rtc.api.RtcWhiteboard.startFollowVision ( )

开始跟随视角

返回
  • OK: 成功
  • Others: 失败

◆ startShareVision()

QResult com.pano.rtc.api.RtcWhiteboard.startShareVision ( )

开始共享视角

返回
  • OK: 成功
  • Others: 失败

◆ stop()

QResult com.pano.rtc.api.RtcWhiteboard.stop ( )

停止白板

返回
  • OK: 成功
  • Others: 失败
注解
默认白板不能被停止

◆ stopFollowVision()

QResult com.pano.rtc.api.RtcWhiteboard.stopFollowVision ( )

结束跟随视角

返回
  • OK: 成功
  • Others: 失败

◆ stopShareVision()

QResult com.pano.rtc.api.RtcWhiteboard.stopShareVision ( )

结束共享视角

返回
  • OK: 成功
  • Others: 失败

◆ switchDoc()

QResult com.pano.rtc.api.RtcWhiteboard.switchDoc ( String  fileId)

切换白板文件

参数
fileId白板文件ID
返回
  • OK: 成功
  • Others: 失败

◆ syncVision()

QResult com.pano.rtc.api.RtcWhiteboard.syncVision ( )

同步当前页视角

返回
  • OK: 成功
  • Others: 失败

◆ undo()

QResult com.pano.rtc.api.RtcWhiteboard.undo ( )

撤消上一次操作

返回
  • OK: 成功
  • Others: 失败

该接口的文档由以下文件生成: