public static class

SnapshotConfig.Builder

extends Object
java.lang.Object
   ↳ com.tencent.navix.api.config.SnapshotConfig.Builder

Summary

Public Constructors
Builder(SnapshotConfig config)
Public Methods
SnapshotConfig build()
SnapshotConfig.Builder setCompressQuality(int compressQuality)
设置截图压缩质量[0-100],默认90
SnapshotConfig.Builder setCornerShape(SnapshotConfig.BitmapCornerShape cornerShape)
设置截图角形状,默认圆形
SnapshotConfig.Builder setFormat(Bitmap.CompressFormat format)
设置截图格式,默认JPEG
SnapshotConfig.Builder setHeight(int height)
设置截图高度(pixel)
SnapshotConfig.Builder setInterval(int interval)
设置截图间隔,单位毫秒(默认5000ms)
SnapshotConfig.Builder setOutputType(SnapshotConfig.OutputType outputType)
设置截图输出类型, 默认byte[]
SnapshotConfig.Builder setPixelQuality(SnapshotConfig.PixelQuality pixelQuality)
设置截图像素质量, 默认高像素质量
SnapshotConfig.Builder setWidth(int width)
设置截图宽度(pixel)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder (SnapshotConfig config)

Public Methods

public SnapshotConfig build ()

public SnapshotConfig.Builder setCompressQuality (int compressQuality)

设置截图压缩质量[0-100],默认90

Parameters
compressQuality 必须在0-100之间,数字越大,质量越好 PNG格式忽略该参数,只在OutputType为BYTE_ARRAY时生效

public SnapshotConfig.Builder setCornerShape (SnapshotConfig.BitmapCornerShape cornerShape)

设置截图角形状,默认圆形

Parameters
cornerShape 角形状

public SnapshotConfig.Builder setFormat (Bitmap.CompressFormat format)

设置截图格式,默认JPEG

Parameters
format 截图格式,只在OutputType为BYTE_ARRAY时生效

public SnapshotConfig.Builder setHeight (int height)

设置截图高度(pixel)

Parameters
height 截图高度(pixel)

public SnapshotConfig.Builder setInterval (int interval)

设置截图间隔,单位毫秒(默认5000ms)

Parameters
interval 截图间隔,单位毫秒

public SnapshotConfig.Builder setOutputType (SnapshotConfig.OutputType outputType)

设置截图输出类型, 默认byte[]

Parameters
outputType 输出类型

public SnapshotConfig.Builder setPixelQuality (SnapshotConfig.PixelQuality pixelQuality)

设置截图像素质量, 默认高像素质量

Parameters
pixelQuality 像素质量

public SnapshotConfig.Builder setWidth (int width)

设置截图宽度(pixel)

Parameters
width 截图宽度(pixel)