CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdPdfPublish::OdWatermark Class Reference

#include <PdfPublishWatermark.h>

Inheritance diagram for OdPdfPublish::OdWatermark:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdWatermark)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdWatermark ()
 
void setSize (const OdUInt32 width, const OdUInt32 height)
 
void setOpacity (const OdUInt8 &value)
 
void addText (const OdTextPtr &text, const OdRect &location, const double rotation=0.)
 
void addImage (const OdImagePtr &image, const OdRect &location, const double rotation=0.)
 
void getSize (OdUInt32 &width, OdUInt32 &height) const
 
void getOpacity (OdUInt8 &value) const
 
void getTexts (OdTextPtrArray &texts, OdRectArray &locations, OdDoubleArray &rotations) const
 
void getImages (OdImagePtrArray &images, OdRectArray &locations, OdDoubleArray &rotations) const
 
- Public Member Functions inherited from OdPdfPublish::OdObject
 ODRX_DECLARE_MEMBERS (OdObject)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdObject ()
 
virtual bool isEmpty () const
 
virtual bool isValid () const
 
virtual void clear ()
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdWatermark ()
 
- Protected Member Functions inherited from OdPdfPublish::OdObject
 OdObject (OdPublishObjectImpl *pImpl)
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
static void rxInit ()
 
static void rxUninit ()
 

Detailed Description

This class implements functionality for work with a watermark in a PDF document created with Publish SDK.

Definition at line 47 of file PdfPublishWatermark.h.

Constructor & Destructor Documentation

◆ OdWatermark()

OdPdfPublish::OdWatermark::OdWatermark ( )
protected

◆ ~OdWatermark()

virtual OdPdfPublish::OdWatermark::~OdWatermark ( )
virtual

Destroys the watermark object.

Member Function Documentation

◆ addImage()

void OdPdfPublish::OdWatermark::addImage ( const OdImagePtr & image,
const OdRect & location,
const double rotation = 0. )

Adds an <link OdPdfPublish::OdImage, image> to the watermark.

Parameters
image[in] A smart pointer to an image object that should be added.
location[in] A <link OdPdfPublish::OdRect, rectangle> that specifies the location of an added image within the watermark. It determines where the image is placed on the watermark.
rotation[in] A rotation angle value to be set.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ addText()

void OdPdfPublish::OdWatermark::addText ( const OdTextPtr & text,
const OdRect & location,
const double rotation = 0. )

Adds a <link OdPdfPublish::OdText, text> label to the watermark.

Parameters
text[in] A smart pointer to a text label that should be added.
location[in] A <link OdPdfPublish::OdRect, rectangle> that specifies the location of an added text label within the watermark. It determines where the text is placed on the watermark.
rotation[in] A rotation angle value to be set.
Remarks
The location determines the bottom-left position of the bounding box of the text on the watermark.
See also
<link OdPdfPublish::OdText, OdText class>.

◆ getImages()

void OdPdfPublish::OdWatermark::getImages ( OdImagePtrArray & images,
OdRectArray & locations,
OdDoubleArray & rotations ) const

Returns all <link OdPdfPublish::OdImage, images> that the watermark contains and their locations. The method fills three passed arrays with text label objects, their locations and rotation angles, then returns these arrays to a calling subroutine.

Parameters
images[out] A placeholder for the watermark images array.
locations[out] A placeholder for the image locations array.
rotations[out] A placeholder for the array of rotation angles for images.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ getOpacity()

void OdPdfPublish::OdWatermark::getOpacity ( OdUInt8 & value) const

Returns the icon opacity for the watermark object. The method fills a passed unsigned 8-bit integer value with the opacity value and returns it to a calling subroutine.

Parameters
value[in] A placeholder for the opacity value.
Remarks
The opacity value should be in the range between 0 and 100. Default value is 50.

◆ getSize()

void OdPdfPublish::OdWatermark::getSize ( OdUInt32 & width,
OdUInt32 & height ) const

Returns the current watermark internal size (width and height in pixels). The method fills the passed integer values representing width and height of the watermark and returns them to the calling subroutine.

Parameters
width[out] A placeholder for the width value.
height[out] A placeholder for the height value.

◆ getTexts()

void OdPdfPublish::OdWatermark::getTexts ( OdTextPtrArray & texts,
OdRectArray & locations,
OdDoubleArray & rotations ) const

Returns all <link OdPdfPublish::OdText, text labels> that the watermark contains and their locations. The method fills three passed arrays with text label objects, their locations and rotation angles, then returns these arrays to a calling subroutine.

Parameters
texts[out] A placeholder for the watermark text labels array.
locations[out] A placeholder for the text label locations array.
rotations[out] A placeholder for the array of rotation angles for text labels.
See also
<link OdPdfPublish::OdText, OdText class>.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdWatermark::ODRX_DECLARE_MEMBERS ( OdWatermark )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdWatermark::ODRX_HEAP_OPERATORS ( )

◆ setOpacity()

void OdPdfPublish::OdWatermark::setOpacity ( const OdUInt8 & value)

Sets the opacity for the watermark object.

Parameters
value[in] A new opacity value.
Remarks
The opacity value should be in the range between 0 and 100. Default value is 50.

◆ setSize()

void OdPdfPublish::OdWatermark::setSize ( const OdUInt32 width,
const OdUInt32 height )

Sets the watermark internal size in pixels.

Parameters
width[in] A width value in pixels.
height[in] A height value in pixels.

The documentation for this class was generated from the following file: