public class WatermarkSetting
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WatermarkSetting.WATERMARK_LOCATION
Define the relative location of watermark on the screen when start streaming
|
static class |
WatermarkSetting.WATERMARK_SIZE
Define the relative size of watermark
|
Constructor and Description |
---|
WatermarkSetting(Context ctx,
int resId,
WatermarkSetting.WATERMARK_LOCATION location,
int alpha)
Construct the WatermarkSetting.
|
WatermarkSetting(Context ctx,
int resId,
WatermarkSetting.WATERMARK_LOCATION location,
WatermarkSetting.WATERMARK_SIZE size,
int alpha)
Construct the WatermarkSetting.
|
WatermarkSetting(Context ctx,
java.lang.String absoluteResPath,
WatermarkSetting.WATERMARK_LOCATION location,
WatermarkSetting.WATERMARK_SIZE size,
int alpha)
Construct the WatermarkSetting.
|
Modifier and Type | Method and Description |
---|---|
int |
getAlpha()
Gets the current alpha value.
|
int |
getBmpHeight() |
int |
getBmpWidth() |
float |
getHRatio() |
Bitmap |
getSWWatermakBitmap(int w,
int h) |
Bitmap |
getWatermarkBitmap() |
WatermarkSetting.WATERMARK_LOCATION |
getWatermarkLocation()
Gets the current
WatermarkSetting.WATERMARK_LOCATION . |
WatermarkSetting.WATERMARK_SIZE |
getWatermarkSize()
Gets the current
WatermarkSetting.WATERMARK_SIZE . |
float |
getWRatio() |
void |
release() |
void |
updateWHRatio(float wRatio,
float hRatio) |
public WatermarkSetting(Context ctx, int resId, WatermarkSetting.WATERMARK_LOCATION location, int alpha)
WatermarkSetting.WATERMARK_SIZE.MEDIUM
ctx
- application contextresId
- watermark resource idlocation
- define the watermark location on the screenalpha
- the transparency of water on the screen, the value is [0..255]public WatermarkSetting(Context ctx, java.lang.String absoluteResPath, WatermarkSetting.WATERMARK_LOCATION location, WatermarkSetting.WATERMARK_SIZE size, int alpha)
ctx
- application contextabsoluteResPath
- watermark resource absolute pathlocation
- define the watermark location on the screensize
- define the relative size of watermark on the screenalpha
- the transparency of water on the screen, the value is [0..255]public WatermarkSetting(Context ctx, int resId, WatermarkSetting.WATERMARK_LOCATION location, WatermarkSetting.WATERMARK_SIZE size, int alpha)
ctx
- application contextresId
- watermark resource idlocation
- define the watermark location on the screensize
- define the relative size of watermark on the screenalpha
- the transparency of water on the screen, the value is [0..255]public WatermarkSetting.WATERMARK_LOCATION getWatermarkLocation()
WatermarkSetting.WATERMARK_LOCATION
.WatermarkSetting.WATERMARK_LOCATION
.public WatermarkSetting.WATERMARK_SIZE getWatermarkSize()
WatermarkSetting.WATERMARK_SIZE
.WatermarkSetting.WATERMARK_SIZE
.public int getAlpha()
public int getBmpWidth()
public int getBmpHeight()
public Bitmap getWatermarkBitmap()
public float getWRatio()
public float getHRatio()
public void release()
public void updateWHRatio(float wRatio, float hRatio)
public Bitmap getSWWatermakBitmap(int w, int h)