FWatermarkOptions
Configurations of the watermark image.
USTRUCT(BlueprintType) struct FWatermarkOptions { GENERATED_BODY() public: UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkOptions") bool visibleInPreview = false; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkOptions") FRectangle positionInLandscapeMode = FRectangle(); UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkOptions") FRectangle positionInPortraitMode = FRectangle(); UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkOptions") FWatermarkRatio watermarkRatio = FWatermarkRatio(); UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Agora|WatermarkOptions") EWATERMARK_FIT_MODE mode = EWATERMARK_FIT_MODE::FIT_MODE_COVER_POSITION; FWatermarkOptions(){} FWatermarkOptions(const agora::rtc::WatermarkOptions & AgoraData){ visibleInPreview = AgoraData.visibleInPreview; positionInLandscapeMode = FRectangle(AgoraData.positionInLandscapeMode); positionInPortraitMode = FRectangle(AgoraData.positionInPortraitMode); watermarkRatio = FWatermarkRatio(AgoraData.watermarkRatio); mode = static_cast<EWATERMARK_FIT_MODE>(AgoraData.mode); } agora::rtc::WatermarkOptions CreateAgoraData() const { agora::rtc::WatermarkOptions AgoraData; AgoraData.visibleInPreview = visibleInPreview; AgoraData.positionInLandscapeMode = positionInLandscapeMode.CreateAgoraData(); AgoraData.positionInPortraitMode = positionInPortraitMode.CreateAgoraData(); AgoraData.watermarkRatio = watermarkRatio.CreateAgoraData(); AgoraData.mode = static_cast<agora::rtc::WATERMARK_FIT_MODE>(mode); return AgoraData; } void FreeAgoraData(agora::rtc::WatermarkOptions & AgoraData) const { positionInLandscapeMode.FreeAgoraData(AgoraData.positionInLandscapeMode); positionInPortraitMode.FreeAgoraData(AgoraData.positionInPortraitMode); watermarkRatio.FreeAgoraData(AgoraData.watermarkRatio); } };
Attributes
- visibleInPreview
- 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
- When the adaptation mode of the watermark is FIT_MODE_COVER_POSITION, it is used to set the area of the watermark image in landscape mode. See FRectangle.
- positionInPortraitMode
- When the adaptation mode of the watermark is FIT_MODE_COVER_POSITION, it is used to set the area of the watermark image in portrait mode. See FRectangle.
- watermarkRatio
- When the watermark adaptation mode is FIT_MODE_USE_IMAGE_RATIO, this parameter is used to set the watermark coordinates. See FWatermarkRatio.
- mode
- The adaptation mode of the watermark. See EWATERMARK_FIT_MODE.