Agora Java API Reference for Android

Classes | Public Member Functions | Public Attributes | List of all members
io.agora.rtc2.video.WatermarkOptions Class Reference

Watermark image configurations. More...

## Classes
class | Rectangle
| The location of the target area relative to the screen or window. If you do not set this. More...

## Public Member Functions
int[] | getPositionInLandscapeMode ()
| Gets the position of the watermark in landscape mode. More...
int[] | getPositionInPortraitMode ()
| Gets the position of the watermark in portrait mode. More...
boolean | isVisibleInPreview ()
| Checks whether the watermark is visible in the local video preview. More...
int | getzOrder ()
| Gets the Z-order index of the watermark image. More...

## Public Attributes
boolean | visibleInPreview = true
Rectangle | positionInLandscapeMode = new Rectangle()
Rectangle | positionInPortraitMode = new Rectangle()
int | zOrder = 0

## Detailed Description

Watermark image configurations.

Since
  4.6.0

Configuration options for setting the watermark image to be added.

## Member Function Documentation

## ◆ getPositionInLandscapeMode()

int [] io.agora.rtc2.video.WatermarkOptions.getPositionInLandscapeMode | ( |  | ) |

Gets the position of the watermark in landscape mode.

Since
  4.6.0

Gets the position of the watermark in landscape mode.

Returns
  When the method call succeeds, it returns an integer array with four elements representing the x, y, width, and height of the watermark rectangle.

## ◆ getPositionInPortraitMode()

int [] io.agora.rtc2.video.WatermarkOptions.getPositionInPortraitMode | ( |  | ) |

Gets the position of the watermark in portrait mode.

Since
  4.6.0

Gets the position of the watermark in portrait mode.

Returns
  When the method call succeeds, it returns an integer array of four elements representing the x, y, width, and height of the watermark rectangle.

## ◆ isVisibleInPreview()

boolean io.agora.rtc2.video.WatermarkOptions.isVisibleInPreview | ( |  | ) |

Checks whether the watermark is visible in the local video preview.

Since
  4.6.0

Checks whether the watermark is visible in the local video preview.

Returns
  - `true`: The watermark is visible in the local video preview.
  - `false`: The watermark is not visible in the local video preview.

## ◆ getzOrder()

int io.agora.rtc2.video.WatermarkOptions.getzOrder | ( |  | ) |

Gets the Z-order index of the watermark image.

Since
  4.6.0

Used to get the Z-order index of the watermark image for rendering.

Returns
  If the method call succeeds, returns the Z-order index of the watermark image.

## Member Data Documentation

## ◆ visibleInPreview

boolean io.agora.rtc2.video.WatermarkOptions.visibleInPreview = true

Whether the watermark is visible in the local preview view:

- `true`: (Default) The watermark is visible in the local preview view.
- `false`: The watermark is not visible in the local preview view.

## ◆ positionInLandscapeMode

Rectangle io.agora.rtc2.video.WatermarkOptions.positionInLandscapeMode = new Rectangle()

The area to display the watermark image in landscape mode. See `Rectangle`.

## ◆ positionInPortraitMode

Rectangle io.agora.rtc2.video.WatermarkOptions.positionInPortraitMode = new Rectangle()

The area to display the watermark image in portrait mode. See `Rectangle`.

## ◆ zOrder

int io.agora.rtc2.video.WatermarkOptions.zOrder = 0

Layer order of the watermark image. The default value is 0.

Since
  4.6.0