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

PanoAnnotation 接口类对应用程序提供了所有的标注相关方法。 更多...

enum  AnnoScalingMode
 标注区域缩放模式。 更多...
 
interface  Callback
 PANO标注引擎回调接口。 更多...
 
enum  ExternalAnnoMode
 外部标注模式。 更多...
 

Public 成员函数

QResult setCallback (Callback callback)
 设置标注回调函数,用以接收标注事件消息
 
QResult startAnnotation (RtcWbView view)
 开始标注。 更多...
 
QResult stopAnnotation ()
 停止标注 更多...
 
QResult setVisible (boolean visible)
 设置标注视图是否可见 更多...
 
PanoLabelView getAttachedLabelView ()
 获取绑定的PanoLabelView 更多...
 
QResult setRoleType (Constants.WBRoleType role)
 设置标注角色类型。 更多...
 
QResult setToolType (Constants.WBToolType type)
 设置工具类型 更多...
 
QResult setLineWidth (int size)
 设置线宽 更多...
 
QResult setColor (int color)
 设置标注颜色。 更多...
 
QResult setColor (float r, float g, float b, float a)
 设置标注颜色。 更多...
 
QResult setFillType (Constants.WBFillType type)
 设置填充类型 更多...
 
QResult setFillColor (int color)
 设置填充颜色。 更多...
 
QResult setFontStyle (Constants.WBFontStyle style)
 设置字体样式 更多...
 
QResult setFontSize (int size)
 设置字体大小 更多...
 
QResult clearContents ()
 清除标注内容,需要 ADMIN 角色才可调用成功 更多...
 
QResult clearUserContents (long userId)
 清除指定用户的标注内容 更多...
 
QResult undo ()
 撤消上一次操作 更多...
 
QResult redo ()
 重做标注的上一次被撤销操作 更多...
 
QResult snapshot (String outputDir)
 保存标注内容到图像。 更多...
 
Constants.WBToolType getToolType ()
 获取工具类型 更多...
 
QResult setAspectSize (int w, int h)
 设置标注区域大小 更多...
 
QResult setScalingMode (AnnoScalingMode mode)
 设置标注区域缩放模式 更多...
 
QResult enableLocalRender (boolean enable)
 是否启用标注本地显示。默认启用 更多...
 
QResult enableShowDraws (boolean enable)
 显示或隐藏涂鸦。默认显示 更多...
 
QResult enableUIResponse (boolean enable)
 是否启用标注响应UI事件。默认启用 更多...
 
QResult enableCursorPosSync (boolean enable)
 设置是否同步光标或画笔位置。默认关闭 更多...
 
QResult enableShowRemoteCursor (boolean enable, PanoLabelView view)
 设置是否显示远端光标或画笔。默认关闭 更多...
 
QResult setExtAnnoMode (ExternalAnnoMode mode)
 设置外部标注模式。仅对外部标注有效。 更多...
 

详细描述

PanoAnnotation 接口类对应用程序提供了所有的标注相关方法。

PanoAnnotation 对象可以通过 PanoAnnotationManager 实例获取。

成员函数说明

◆ clearContents()

QResult com.pano.rtc.api.PanoAnnotation.clearContents ( )

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

返回
  • OK: 成功
  • NO_PRIVILEGE: 没有权限
  • Others: 失败
注解
此接口只有 ADMIN 角色才可调用

◆ clearUserContents()

QResult com.pano.rtc.api.PanoAnnotation.clearUserContents ( long  userId)

清除指定用户的标注内容

参数
userId用户ID
返回
  • OK: 成功
  • NO_PRIVILEGE: 没有权限
  • Others: 失败
注解
只有 ADMIN 角色才可以清除非本地用户的内容

◆ enableCursorPosSync()

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

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

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

◆ enableLocalRender()

QResult com.pano.rtc.api.PanoAnnotation.enableLocalRender ( boolean  enable)

是否启用标注本地显示。默认启用

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

◆ enableShowDraws()

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

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

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

◆ enableShowRemoteCursor()

QResult com.pano.rtc.api.PanoAnnotation.enableShowRemoteCursor ( boolean  enable,
PanoLabelView  view 
)

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

参数
enable是否打开.
viewPanoLabelView用于显示远端光标或画笔
返回
  • OK: 成功
  • Others: 失败

◆ enableUIResponse()

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

是否启用标注响应UI事件。默认启用

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

◆ getAttachedLabelView()

PanoLabelView com.pano.rtc.api.PanoAnnotation.getAttachedLabelView ( )

获取绑定的PanoLabelView

返回
  • 绑定的PanoLabelView

◆ getToolType()

Constants.WBToolType com.pano.rtc.api.PanoAnnotation.getToolType ( )

获取工具类型

返回
  • 工具类型

◆ redo()

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

重做标注的上一次被撤销操作

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

◆ setAspectSize()

QResult com.pano.rtc.api.PanoAnnotation.setAspectSize ( int  w,
int  h 
)

设置标注区域大小

参数
w
h
返回
  • OK: 成功
  • Others: 失败

◆ setColor() [1/2]

QResult com.pano.rtc.api.PanoAnnotation.setColor ( float  r,
float  g,
float  b,
float  a 
)

设置标注颜色。

参数
rg b a 颜色值。

◆ setColor() [2/2]

QResult com.pano.rtc.api.PanoAnnotation.setColor ( int  color)

设置标注颜色。

参数
color新的标注颜色值(包含透明度)。
返回
  • OK: 成功
  • Others: 失败

◆ setExtAnnoMode()

QResult com.pano.rtc.api.PanoAnnotation.setExtAnnoMode ( ExternalAnnoMode  mode)

设置外部标注模式。仅对外部标注有效。

参数
modeExternalAnnoMode类别
返回
  • OK: 成功
  • 其他: 失败

◆ setFillColor()

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

设置填充颜色。

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

◆ setFillType()

QResult com.pano.rtc.api.PanoAnnotation.setFillType ( Constants.WBFillType  type)

设置填充类型

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

◆ setFontSize()

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

设置字体大小

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

◆ setFontStyle()

QResult com.pano.rtc.api.PanoAnnotation.setFontStyle ( Constants.WBFontStyle  style)

设置字体样式

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

◆ setLineWidth()

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

设置线宽

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

◆ setRoleType()

QResult com.pano.rtc.api.PanoAnnotation.setRoleType ( Constants.WBRoleType  role)

设置标注角色类型。

参数
role标注角色。

◆ setScalingMode()

QResult com.pano.rtc.api.PanoAnnotation.setScalingMode ( AnnoScalingMode  mode)

设置标注区域缩放模式

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

◆ setToolType()

QResult com.pano.rtc.api.PanoAnnotation.setToolType ( Constants.WBToolType  type)

设置工具类型

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

◆ setVisible()

QResult com.pano.rtc.api.PanoAnnotation.setVisible ( boolean  visible)

设置标注视图是否可见

参数
visible是否可见
返回
  • OK: 成功
  • Others: 失败
注解
标注视图默认是可见的

◆ snapshot()

QResult com.pano.rtc.api.PanoAnnotation.snapshot ( String  outputDir)

保存标注内容到图像。

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

◆ startAnnotation()

QResult com.pano.rtc.api.PanoAnnotation.startAnnotation ( RtcWbView  view)

开始标注。

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

◆ stopAnnotation()

QResult com.pano.rtc.api.PanoAnnotation.stopAnnotation ( )

停止标注

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

◆ undo()

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

撤消上一次操作

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

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