Represents class to work with document watermark.
#include <Aspose.Words.Cpp/Watermark.h>
Public Member Functions | |
WatermarkType | get_Type () |
Gets the watermark type. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
void | Remove () |
Removes the watermark. More... | |
void | SetImage (const SharedPtr< Image > &image) |
Adds Image watermark into the document. More... | |
void | SetImage (const SharedPtr< Image > &image, const SharedPtr< ImageWatermarkOptions > &options) |
Adds Image watermark into the document. More... | |
void | SetImage (const String &imagePath, const SharedPtr< ImageWatermarkOptions > &options) |
Adds Image watermark into the document. More... | |
void | SetText (const String &text) |
Adds Text watermark into the document. More... | |
void | SetText (const String &text, const SharedPtr< TextWatermarkOptions > &options) |
Adds Text watermark into the document. More... | |
Static Public Member Functions | |
static const TypeInfo & | Type () |
Aspose::Words::WatermarkType Aspose::Words::Watermark::get_Type | ( | ) |
Gets the watermark type.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
void Aspose::Words::Watermark::Remove | ( | ) |
Removes the watermark.
Shows how to create a text watermark.
void Aspose::Words::Watermark::SetImage | ( | const System::SharedPtr< System::Drawing::Image > & | image | ) |
Adds Image watermark into the document.
image | Image that is displayed as a watermark. |
System::ArgumentNullException | Throws when the image is null. |
void Aspose::Words::Watermark::SetImage | ( | const System::SharedPtr< System::Drawing::Image > & | image, |
const System::SharedPtr< Aspose::Words::ImageWatermarkOptions > & | options | ||
) |
Adds Image watermark into the document.
image | Image that is displayed as a watermark. |
options | Defines additional options for the image watermark. |
System::ArgumentNullException | Throws when the image is null. |
Shows how to create a watermark from an image in the local file system.
void Aspose::Words::Watermark::SetImage | ( | const System::String & | imagePath, |
const System::SharedPtr< Aspose::Words::ImageWatermarkOptions > & | options | ||
) |
Adds Image watermark into the document.
imagePath | Path to the image file that is displayed as a watermark. |
options | Defines additional options for the image watermark. |
System::ArgumentNullException | Throws when the path is null. |
void Aspose::Words::Watermark::SetText | ( | const System::String & | text | ) |
Adds Text watermark into the document.
text | Text that is displayed as a watermark. |
System::ArgumentOutOfRangeException | Throws when the text length is out of range or the text contains only whitespaces. |
System::ArgumentNullException | Throws when the text is null. |
Shows how to create a text watermark.
void Aspose::Words::Watermark::SetText | ( | const System::String & | text, |
const System::SharedPtr< Aspose::Words::TextWatermarkOptions > & | options | ||
) |
Adds Text watermark into the document.
text | Text that is displayed as a watermark. |
options | Defines additional options for the text watermark. |
System::ArgumentOutOfRangeException | Throws when the text length is out of range or the text contain only whitespaces. |
System::ArgumentNullException | Throws when the text is null. |
Shows how to create a text watermark.
|
static |