WatermarkOptions

Configurations of the watermark image.

public class WatermarkOptions
    {
        public WatermarkOptions()
        {
            visibleInPreview = false;
            positionInLandscapeMode = new Rectangle(0, 0, 0, 0);
            positionInPortraitMode = new Rectangle(0, 0, 0, 0);
            watermarkRatio = new WatermarkRatio();
            mode = WATERMARK_FIT_MODE.FIT_MODE_COVER_POSITION;
        }

        public WatermarkOptions(bool visibleInPreview, Rectangle positionInLandscapeMode,
            Rectangle positionInPortraitMode, WatermarkRatio ratio, WATERMARK_FIT_MODE mode)
        {
            this.visibleInPreview = visibleInPreview;
            this.positionInLandscapeMode = positionInLandscapeMode ?? new Rectangle();
            this.positionInPortraitMode = positionInPortraitMode ?? new Rectangle();
            this.watermarkRatio = ratio ?? new WatermarkRatio();
            this.mode = mode;
        }
        public bool visibleInPreview { set; get; }
        public Rectangle positionInLandscapeMode { set; get; }
        public Rectangle positionInPortraitMode { set; get; }
        public WatermarkRatio watermarkRatio { set; get; }
        public WATERMARK_FIT_MODE mode { set; get; }
    }

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 Rectangle.
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 Rectangle.
watermarkRatio
When the watermark adaptation mode is FIT_MODE_USE_IMAGE_RATIO, this parameter is used to set the watermark coordinates. See WatermarkRatio.
mode
The adaptation mode of the watermark. See WATERMARK_FIT_MODE.