DiagramShapeWatermarkOptions class
Leave feedback
On this page
Represents watermark adding options when adding shape watermark to a Visio document.
- Add watermarks to diagram documents (https://docs.groupdocs.com/display/watermarknet/Add+watermarks+to+diagram+documents)
The DiagramShapeWatermarkOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the DiagramShapeWatermarkOptions class. |
| 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) |
| Field | Description |
|---|---|
| DEFAULT | Gets the default value for the class. (inherited from WatermarkOptions) |
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")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.