CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
OdPdfPublish::OdText Class Reference

#include <PdfPublishText.h>

Inheritance diagram for OdPdfPublish::OdText:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdText)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdText ()
 
void setText (const OdString &text)
 
void setFont (Text::StandardFontsType fontType)
 
void setFont (const OdString &fontName, Text::Language language, bool embed)
 
void setSize (OdUInt16 size)
 
void setColor (ODCOLORREF color)
 
void getText (OdString &text) const
 
void getFont (Text::StorageType &storageType, Text::StandardFontsType &fontType, OdString &fontName, Text::Language &language, bool &embed) const
 
void getSize (OdUInt16 &size) const
 
void getColor (ODCOLORREF &color) const
 
void setLayer (const Od2dGeometryLayerPtr &layer)
 
void getLayer (Od2dGeometryLayerPtr &layer) 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

 OdText ()
 
- 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 ()
 

Detailed Description

This class implements a text label for .pdf documents created with Publish SDK. Text label options consist of two parts: text content and formatting parameters (font type, size, color).

Definition at line 47 of file PdfPublishText.h.

Constructor & Destructor Documentation

◆ OdText()

OdPdfPublish::OdText::OdText ( )
protected

◆ ~OdText()

virtual OdPdfPublish::OdText::~OdText ( )
virtual

Destroys a text label.

Member Function Documentation

◆ getColor()

void OdPdfPublish::OdText::getColor ( ODCOLORREF color) const

Returns the text label color. The method fills a passed ODCOLORREF value and returns it to a calling subroutine.

Parameters
color[out] A placeholder for the text label color value.

◆ getFont()

void OdPdfPublish::OdText::getFont ( Text::StorageType storageType,
Text::StandardFontsType fontType,
OdString fontName,
Text::Language language,
bool &  embed 
) const

Returns the text label font type. The method fills a passed font type value and returns this string to a calling subroutine.

Parameters
storageType[out] A placeholder for the storage type value.
fontType[out] A placeholder for the font type that should be used for displaying list box items.
fontName[out] A placeholder for the font name that should be used for displaying list box items.
language[out] A placeholder for the font language that should be used for displaying list box items.
embed[out] A placeholder for the font embedding flag.
See also
<link OdPdfPublish::Text::StorageType, Text::StorageType enumeration> <link OdPdfPublish::Text::StandardFontsType, Text::StandardFontsType enumeration> <link OdPdfPublish::Text::Language, Text::Language enumeration>

◆ getLayer()

void OdPdfPublish::OdText::getLayer ( Od2dGeometryLayerPtr &  layer) const

Returns the current PDF layer object for the text object.

Parameters
layer[out] A placeholder for a smart pointer to PDF layer object.
Remarks
The method fills a passed value and returns it to a calling subroutine.

◆ getSize()

void OdPdfPublish::OdText::getSize ( OdUInt16 size) const

Returns the text label font size. The method fills a passed value and returns it to a calling subroutine.

Parameters
size[out] A placeholder for the font size value.

◆ getText()

void OdPdfPublish::OdText::getText ( OdString text) const

Returns the text label content. The method fills a passed string object with label text and returns this string to a calling subroutine.

Parameters
text[out] A placeholder for the label text.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdText::ODRX_DECLARE_MEMBERS ( OdText  )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdText::ODRX_HEAP_OPERATORS ( )

◆ setColor()

void OdPdfPublish::OdText::setColor ( ODCOLORREF  color)

Sets the text label foreground color.

Parameters
color[in] A new color value.

◆ setFont() [1/2]

void OdPdfPublish::OdText::setFont ( const OdString fontName,
Text::Language  language,
bool  embed 
)

Sets font name and font language for the text label.

Parameters
fontName[in] A new font name for the text label.
language[in] A new font language for the text label.
embed[in] A flag that determines whether the font is embedded.
Remarks
This method can set a font that is not in the list of <link OdPdfPublish::Text::StandardFontsType, standard fonts>. By default the <link OdPdfPublish::Text::StandardFontsType::kTimesRoman, normal Times New Roman font> is used.
See also
<link OdPdfPublish::Text::FontStyle, Text::FontStyle enumeration> <link OdPdfPublish::Text::Language, Text::Language enumeration>.

◆ setFont() [2/2]

void OdPdfPublish::OdText::setFont ( Text::StandardFontsType  fontType)

Sets the text label font type from the list of <link OdPdfPublish::Text::StandardFontsType, predefined fonts>.

Parameters
fontType[in] A new font type value.
See also
<link OdPdfPublish::Text::StandardFontsType, Text::StandardFontsType enumeration>.

◆ setLayer()

void OdPdfPublish::OdText::setLayer ( const Od2dGeometryLayerPtr &  layer)

Sets a new PDF layer object for the text object.

Parameters
layer[in] A smart pointer to a PDF layer object.
Remarks
If the smart pointer to a PDF layer object is null, it means that the text object doesn't belong to any layer.

◆ setSize()

void OdPdfPublish::OdText::setSize ( OdUInt16  size)

Sets the text label font size.

Parameters
size[in] A new font size value.

◆ setText()

void OdPdfPublish::OdText::setText ( const OdString text)

Sets the label text.

Parameters
text[in] New label text.

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