FWatermarkRatio
The position and size of the watermark on the screen.
USTRUCT(BlueprintType) struct FWatermarkRatio { GENERATED_BODY() public: UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkRatio") float xRatio = 0; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkRatio") float yRatio = 0; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkRatio") float widthRatio = 0; FWatermarkRatio(){} FWatermarkRatio(const agora::rtc::WatermarkRatio & AgoraData){ xRatio = AgoraData.xRatio; yRatio = AgoraData.yRatio; widthRatio = AgoraData.widthRatio; } agora::rtc::WatermarkRatio CreateAgoraData() const { agora::rtc::WatermarkRatio AgoraData; AgoraData.xRatio = xRatio; AgoraData.yRatio = yRatio; AgoraData.widthRatio = widthRatio; return AgoraData; } void FreeAgoraData(agora::rtc::WatermarkRatio & AgoraData) const { } };
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.
Attributes
- 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
- 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
- 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.