Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cpdf_textpage.h>
Classes | |
class | CharInfo |
Public Types | |
enum class | CharType : uint8_t { kNormal , kGenerated , kNotUnicode , kHyphen , kPiece } |
Public Member Functions | |
CPDF_TextPage (const CPDF_Page *pPage, bool rtl) | |
~CPDF_TextPage () | |
int | CharIndexFromTextIndex (int text_index) const |
int | TextIndexFromCharIndex (int char_index) const |
size_t | size () const |
int | CountChars () const |
const CharInfo & | GetCharInfo (size_t index) const |
float | GetCharFontSize (size_t index) const |
CFX_FloatRect | GetCharLooseBounds (size_t index) const |
std::vector< CFX_FloatRect > | GetRectArray (int start, int count) const |
int | GetIndexAtPos (const CFX_PointF &point, const CFX_SizeF &tolerance) const |
WideString | GetTextByRect (const CFX_FloatRect &rect) const |
WideString | GetTextByObject (const CPDF_TextObject *pTextObj) const |
WideString | GetPageText (int start, int count) const |
WideString | GetAllPageText () const |
int | CountRects (int start, int nCount) |
bool | GetRect (int rectIndex, CFX_FloatRect *pRect) const |
Definition at line 36 of file cpdf_textpage.h.
|
strong |
Enumerator | |
---|---|
kNormal | |
kGenerated | |
kNotUnicode | |
kHyphen | |
kPiece |
Definition at line 38 of file cpdf_textpage.h.
CPDF_TextPage::CPDF_TextPage | ( | const CPDF_Page * | pPage, |
bool | rtl ) |
Definition at line 285 of file cpdf_textpage.cpp.
References CPDF_TextPage().
Referenced by CPDF_TextPage().
|
default |
int CPDF_TextPage::CharIndexFromTextIndex | ( | int | text_index | ) | const |
Definition at line 323 of file cpdf_textpage.cpp.
Referenced by FPDFText_GetCharIndexFromTextIndex().
int CPDF_TextPage::CountChars | ( | ) | const |
Definition at line 319 of file cpdf_textpage.cpp.
Referenced by FPDFText_CountChars(), FPDFText_GetText(), GetAllPageText(), GetIndexAtPos(), GetPageText(), and GetRectArray().
int CPDF_TextPage::CountRects | ( | int | start, |
int | nCount ) |
Definition at line 529 of file cpdf_textpage.cpp.
Referenced by FPDFText_CountRects().
|
inline |
Definition at line 84 of file cpdf_textpage.h.
References CountChars(), and GetPageText().
float CPDF_TextPage::GetCharFontSize | ( | size_t | index | ) | const |
Definition at line 477 of file cpdf_textpage.cpp.
const CPDF_TextPage::CharInfo & CPDF_TextPage::GetCharInfo | ( | size_t | index | ) | const |
Definition at line 472 of file cpdf_textpage.cpp.
CFX_FloatRect CPDF_TextPage::GetCharLooseBounds | ( | size_t | index | ) | const |
Definition at line 482 of file cpdf_textpage.cpp.
int CPDF_TextPage::GetIndexAtPos | ( | const CFX_PointF & | point, |
const CFX_SizeF & | tolerance ) const |
Definition at line 390 of file cpdf_textpage.cpp.
References CFX_FloatRect::bottom, CFX_FloatRect::Contains(), CountChars(), CFX_FloatRect::left, CFX_FloatRect::Normalize(), CFX_FloatRect::right, and CFX_FloatRect::top.
Referenced by FPDFText_GetCharIndexAtPos().
WideString CPDF_TextPage::GetPageText | ( | int | start, |
int | count ) const |
Definition at line 486 of file cpdf_textpage.cpp.
References fxcrt::WideString::WideString(), CountChars(), and TextIndexFromCharIndex().
Referenced by FPDFText_GetText(), and GetAllPageText().
bool CPDF_TextPage::GetRect | ( | int | rectIndex, |
CFX_FloatRect * | pRect ) const |
Definition at line 537 of file cpdf_textpage.cpp.
Referenced by FPDFText_GetRect().
std::vector< CFX_FloatRect > CPDF_TextPage::GetRectArray | ( | int | start, |
int | count ) const |
Definition at line 345 of file cpdf_textpage.cpp.
References CountChars(), CFX_FloatRect::Height(), kGenerated, CPDF_TextPage::CharInfo::m_CharBox, CPDF_TextPage::CharInfo::m_CharType, CFX_FloatRect::Normalize(), CFX_FloatRect::operator=(), CFX_FloatRect::Union(), and CFX_FloatRect::Width().
WideString CPDF_TextPage::GetTextByObject | ( | const CPDF_TextObject * | pTextObj | ) | const |
Definition at line 465 of file cpdf_textpage.cpp.
Referenced by FPDFTextObj_GetText().
WideString CPDF_TextPage::GetTextByRect | ( | const CFX_FloatRect & | rect | ) | const |
Definition at line 459 of file cpdf_textpage.cpp.
References CPDF_TextPage::CharInfo::m_CharBox.
Referenced by FPDFText_GetBoundedText().
|
inline |
Definition at line 67 of file cpdf_textpage.h.
int CPDF_TextPage::TextIndexFromCharIndex | ( | int | char_index | ) | const |
Definition at line 333 of file cpdf_textpage.cpp.
Referenced by FPDFText_GetTextIndexFromCharIndex(), and GetPageText().