Represents a text run in a PDF document.
More...
#include <pdfsdk/cxx/text_run.h>
|
| TextRun | Copy () const |
| |
| TextRun | MakeEmptyCopy () const |
| |
| bool | Equals (const TextRun &that) const |
| |
| void | InsertChars (size_t index, const char *chars, size_t numChars) |
| |
| void | AppendChars (const char *chars, size_t numChars) |
| |
| void | InsertChars (size_t index, const std::string &chars) |
| |
| void | AppendChars (const std::string &chars) |
| |
| void | RemoveChars (size_t index, size_t numChars) |
| |
| void | InsertUnicodeChars (size_t index, const UnicodeChar *unicodeChars, size_t numUnicodeChars) |
| |
| void | AppendUnicodeChars (const UnicodeChar *unicodeChars, size_t numUnicodeChars) |
| |
| void | InsertUnicodeChars (size_t index, const std::wstring &unicodeChars) |
| |
| void | AppendUnicodeChars (const std::wstring &unicodeChars) |
| |
| GState | GetGState () const |
| |
| void | SetGState (const GState &gState) |
| |
| PDETextState | GetTextState () const |
| |
| void | SetTextState (const PDETextState &textState) |
| |
| Font | GetFont () const |
| |
| void | SetFont (const Font &font) |
| |
| void | SetFont (const Font &font, float fontSize) |
| |
| float | GetFontSize () const |
| |
| void | SetFontSize (float fontSize) |
| |
| Matrix | GetTextMatrix () const |
| |
| void | SetTextMatrix (const Matrix &textMatrix) |
| |
| size_t | GetNumChars () const |
| |
| RectF | GetCharsRect (size_t begindex, size_t endindex) const |
| |
| Quad | GetCharQuad (size_t index) const |
| |
| Quad | GetOutlineQuad (size_t index) const |
| |
| std::wstring | GetText () const |
| |
| std::wstring | GetNthUnicode (size_t charindex) const |
| |
| RectF | GetBBox () const |
| |
| Matrix | GetMatrix () const |
| |
| void | SetMatrix (const Matrix &matrix) |
| |
| Element | GetParent () const |
| |
| bool | IsCharWhitespace (size_t index) const |
| |
|
| TextRun (PDETextItem handle, bool adopt=false) noexcept |
| |
|
| TextRun (const TextRun &rhs) noexcept |
| |
|
TextRun & | operator= (const TextRun &rhs) noexcept |
| |
|
| TextRun (TextRun &&rhs) noexcept |
| |
|
TextRun & | operator= (TextRun &&rhs) noexcept |
| |
Represents a text run in a PDF document.
ISO 32000-2:2020 - 9.4 Text objects
◆ AppendChars() [1/2]
| void PDF::TextRun::AppendChars |
( |
const char * | chars, |
|
|
size_t | numChars ) |
Appends characters to the TextRun object.
- Parameters
-
| chars | The characters to append. |
| numChars | The number of characters to append. |
◆ AppendChars() [2/2]
| void PDF::TextRun::AppendChars |
( |
const std::string & | chars | ) |
|
Appends characters to the TextRun object.
- Parameters
-
| chars | The characters to append. |
◆ AppendUnicodeChars() [1/2]
| void PDF::TextRun::AppendUnicodeChars |
( |
const std::wstring & | unicodeChars | ) |
|
Appends Unicode characters to the TextRun object.
- Parameters
-
| unicodeChars | The Unicode characters to append. |
◆ AppendUnicodeChars() [2/2]
| void PDF::TextRun::AppendUnicodeChars |
( |
const UnicodeChar * | unicodeChars, |
|
|
size_t | numUnicodeChars ) |
Appends Unicode characters to the TextRun object.
- Parameters
-
| unicodeChars | The Unicode characters to append. |
| numUnicodeChars | The number of Unicode characters to append. |
◆ Copy()
| TextRun PDF::TextRun::Copy |
( |
| ) |
const |
Creates a copy of the TextRun object.
- Returns
- A copy of the TextRun object.
◆ Create()
| static TextRun PDF::TextRun::Create |
( |
| ) |
|
|
static |
Creates a new TextRun object.
- Returns
- The newly created TextRun object.
◆ Equals()
| bool PDF::TextRun::Equals |
( |
const TextRun & | that | ) |
const |
Checks if the TextRun object is equal to another TextRun object.
- Parameters
-
| that | The TextRun object to compare with. |
- Returns
- True if the TextRun objects are equal, false otherwise.
◆ GetBBox()
| RectF PDF::TextRun::GetBBox |
( |
| ) |
const |
Gets the bounding box of the TextRun object.
- Returns
- The bounding box of the TextRun object.
◆ GetCharQuad()
| Quad PDF::TextRun::GetCharQuad |
( |
size_t | index | ) |
const |
Gets the quad for a character in the TextRun object.
- Parameters
-
| index | The index of the character. |
- Returns
- The quad for the character.
◆ GetCharsRect()
| RectF PDF::TextRun::GetCharsRect |
( |
size_t | begindex, |
|
|
size_t | endindex ) const |
Gets the bounding box of a range of characters in the TextRun object.
- Parameters
-
| begindex | The beginning index of the range. |
| endindex | The ending index of the range. |
- Returns
- The bounding box of the range of characters.
◆ GetFont()
| Font PDF::TextRun::GetFont |
( |
| ) |
const |
Gets the font of the TextRun object.
- Returns
- The font of the TextRun object.
◆ GetFontSize()
| float PDF::TextRun::GetFontSize |
( |
| ) |
const |
Gets the font size of the TextRun object.
- Returns
- The font size of the TextRun object.
◆ GetGState()
| GState PDF::TextRun::GetGState |
( |
| ) |
const |
Gets the graphics state of the TextRun object.
- Returns
- The graphics state of the TextRun object.
◆ GetMatrix()
| Matrix PDF::TextRun::GetMatrix |
( |
| ) |
const |
Gets the matrix of the TextRun object.
- Returns
- The matrix of the TextRun object.
◆ GetNthUnicode()
| std::wstring PDF::TextRun::GetNthUnicode |
( |
size_t | charindex | ) |
const |
Gets the nth Unicode character in the TextRun object.
- Parameters
-
| charindex | The index of the Unicode character. |
- Returns
- The nth Unicode character.
◆ GetNumChars()
| size_t PDF::TextRun::GetNumChars |
( |
| ) |
const |
Gets the number of characters in the TextRun object.
- Returns
- The number of characters in the TextRun object.
◆ GetOutlineQuad()
| Quad PDF::TextRun::GetOutlineQuad |
( |
size_t | index | ) |
const |
Gets the outline quad for a character in the TextRun object.
- Parameters
-
| index | The index of the character. |
- Returns
- The outline quad for the character.
◆ GetParent()
| Element PDF::TextRun::GetParent |
( |
| ) |
const |
Gets the parent element of the TextRun object.
- Returns
- The parent element of the TextRun object.
◆ GetText()
| std::wstring PDF::TextRun::GetText |
( |
| ) |
const |
Gets the text of the TextRun object.
- Returns
- The text of the TextRun object.
◆ GetTextMatrix()
| Matrix PDF::TextRun::GetTextMatrix |
( |
| ) |
const |
Gets the text matrix of the TextRun object.
- Returns
- The text matrix of the TextRun object.
◆ GetTextState()
Gets the text state of the TextRun object.
- Returns
- The text state of the TextRun object.
◆ InsertChars() [1/2]
| void PDF::TextRun::InsertChars |
( |
size_t | index, |
|
|
const char * | chars, |
|
|
size_t | numChars ) |
Inserts characters into the TextRun object at the specified index.
- Parameters
-
| index | The index at which to insert the characters. |
| chars | The characters to insert. |
| numChars | The number of characters to insert. |
◆ InsertChars() [2/2]
| void PDF::TextRun::InsertChars |
( |
size_t | index, |
|
|
const std::string & | chars ) |
Inserts characters into the TextRun object at the specified index.
- Parameters
-
| index | The index at which to insert the characters. |
| chars | The characters to insert. |
◆ InsertUnicodeChars() [1/2]
| void PDF::TextRun::InsertUnicodeChars |
( |
size_t | index, |
|
|
const std::wstring & | unicodeChars ) |
Inserts a Unicode character into the TextRun object at the specified index.
- Parameters
-
| index | The index at which to insert the Unicode character. |
| unicodeChars | The Unicode characters to insert. |
◆ InsertUnicodeChars() [2/2]
| void PDF::TextRun::InsertUnicodeChars |
( |
size_t | index, |
|
|
const UnicodeChar * | unicodeChars, |
|
|
size_t | numUnicodeChars ) |
Inserts a Unicode character into the TextRun object at the specified index.
- Parameters
-
| index | The index at which to insert the Unicode character. |
| unicodeChars | The Unicode characters to insert. |
| numUnicodeChars | The number of Unicode characters to insert. |
◆ IsCharWhitespace()
| bool PDF::TextRun::IsCharWhitespace |
( |
size_t | index | ) |
const |
Checks if a character in the TextRun object is whitespace.
- Parameters
-
| index | The index of the character. |
- Returns
- True if the character is whitespace, false otherwise.
◆ MakeEmptyCopy()
| TextRun PDF::TextRun::MakeEmptyCopy |
( |
| ) |
const |
Creates an empty copy of the TextRun object.
- Returns
- An empty copy of the TextRun object.
◆ RemoveChars()
| void PDF::TextRun::RemoveChars |
( |
size_t | index, |
|
|
size_t | numChars ) |
Removes characters from the TextRun object starting at the specified index.
- Parameters
-
| index | The index at which to start removing characters. |
| numChars | The number of characters to remove. |
◆ SetFont() [1/2]
| void PDF::TextRun::SetFont |
( |
const Font & | font | ) |
|
Sets the font of the TextRun object.
- Parameters
-
◆ SetFont() [2/2]
| void PDF::TextRun::SetFont |
( |
const Font & | font, |
|
|
float | fontSize ) |
Sets the font of the TextRun object.
- Parameters
-
| font | The font to set. |
| fontSize | The font size to set. |
◆ SetFontSize()
| void PDF::TextRun::SetFontSize |
( |
float | fontSize | ) |
|
Sets the font size of the TextRun object.
- Parameters
-
| fontSize | The font size to set. |
◆ SetGState()
| void PDF::TextRun::SetGState |
( |
const GState & | gState | ) |
|
Sets the graphics state of the TextRun object.
- Parameters
-
| gState | The graphics state to set. |
◆ SetMatrix()
| void PDF::TextRun::SetMatrix |
( |
const Matrix & | matrix | ) |
|
Sets the matrix of the TextRun object.
- Parameters
-
◆ SetTextMatrix()
| void PDF::TextRun::SetTextMatrix |
( |
const Matrix & | textMatrix | ) |
|
Sets the text matrix of the TextRun object.
- Parameters
-
| textMatrix | The text matrix to set. |
◆ SetTextState()
| void PDF::TextRun::SetTextState |
( |
const PDETextState & | textState | ) |
|
Sets the text state of the TextRun object.
- Parameters
-
| textState | The text state to set. |
The documentation for this class was generated from the following file: