DiagramShapeWatermarkOptions class

DiagramShapeWatermarkOptions class

Represents watermark adding options when adding shape watermark to a Visio document.

The DiagramShapeWatermarkOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the DiagramShapeWatermarkOptions class.

Properties

Property Description
placement_type The value specifying to what pages a watermark should be added.
is_locked The property indicates whether editing of the shape in Visio is forbidden. (inherited from DiagramWatermarkOptions)

Fields

Field Description
DEFAULT Gets the default value for the class. (inherited from WatermarkOptions)

Example

from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font, Color
from groupdocs.watermark.common import HorizontalAlignment, VerticalAlignment
from groupdocs.watermark.options.diagram import DiagramShapeWatermarkOptions
from groupdocs.watermark.contents.diagram import DiagramWatermarkPlacementType

def add_watermark_to_diagram():
    with Watermarker("./diagram.vsdx") as watermarker:
        watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 19.0))
        watermark.foreground_color = Color.red
        watermark.horizontal_alignment = HorizontalAlignment.CENTER
        watermark.vertical_alignment = VerticalAlignment.CENTER

        options = DiagramShapeWatermarkOptions()
        options.placement_type = DiagramWatermarkPlacementType.BACKGROUND_PAGES
        watermarker.add(watermark, options)

        watermarker.save("./output.vsdx")

See Also