Agora Java API Reference for Android

Public Member Functions | Public Attributes | List of all members
agora::rtc::WatermarkRatio Struct Reference

`#include <AgoraBase.h>`

## Public Member Functions
| WatermarkRatio (float x, float y, float width)

## Public Attributes
float | xRatio
float | yRatio
float | widthRatio

## Detailed Description

The position and size of the watermark on the screen.

The position and size of the watermark on the screen are determined by `xRatio`, `yRatio`, and `widthRatio`:

- (`xRatio`, `yRatio`) refers to the coordinates of the upper left corner of the watermark, which determines the distance from the upper left corner of the watermark to the upper left corner of the screen. The `widthRatio` determines the width of the watermark.

## Member Data Documentation

## ◆ xRatio

float agora::rtc::WatermarkRatio::xRatio

The x-coordinate of the upper left corner of the watermark. The horizontal position relative to the origin, where the upper left corner of the screen is the origin, and the x-coordinate is the upper left corner of the watermark. The value range is [0.0,1.0], and the default value is 0.

## ◆ yRatio

float agora::rtc::WatermarkRatio::yRatio

The y-coordinate of the upper left corner of the watermark. The vertical position relative to the origin, where the upper left corner of the screen is the origin, and the y-coordinate is the upper left corner of the screen. The value range is [0.0,1.0], and the default value is 0.

## ◆ widthRatio

float agora::rtc::WatermarkRatio::widthRatio

The width of the watermark. The SDK calculates the height of the watermark proportionally according to this parameter value to ensure that the enlarged or reduced watermark image is not distorted. The value range is [0,1], and the default value is 0, which means no watermark is displayed.