Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPDF_TextPage Class Reference

#include <cpdf_textpage.h>

+ Collaboration diagram for CPDF_TextPage:

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 CharInfoGetCharInfo (size_t index) const
 
float GetCharFontSize (size_t index) const
 
CFX_FloatRect GetCharLooseBounds (size_t index) const
 
std::vector< CFX_FloatRectGetRectArray (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
 

Detailed Description

Definition at line 36 of file cpdf_textpage.h.

Member Enumeration Documentation

◆ CharType

enum class CPDF_TextPage::CharType : uint8_t
strong
Enumerator
kNormal 
kGenerated 
kNotUnicode 
kHyphen 
kPiece 

Definition at line 38 of file cpdf_textpage.h.

Constructor & Destructor Documentation

◆ CPDF_TextPage()

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~CPDF_TextPage()

CPDF_TextPage::~CPDF_TextPage ( )
default

Member Function Documentation

◆ CharIndexFromTextIndex()

int CPDF_TextPage::CharIndexFromTextIndex ( int text_index) const

Definition at line 323 of file cpdf_textpage.cpp.

Referenced by FPDFText_GetCharIndexFromTextIndex().

+ Here is the caller graph for this function:

◆ CountChars()

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

+ Here is the caller graph for this function:

◆ CountRects()

int CPDF_TextPage::CountRects ( int start,
int nCount )

Definition at line 529 of file cpdf_textpage.cpp.

Referenced by FPDFText_CountRects().

+ Here is the caller graph for this function:

◆ GetAllPageText()

WideString CPDF_TextPage::GetAllPageText ( ) const
inline

Definition at line 84 of file cpdf_textpage.h.

References CountChars(), and GetPageText().

+ Here is the call graph for this function:

◆ GetCharFontSize()

float CPDF_TextPage::GetCharFontSize ( size_t index) const

Definition at line 477 of file cpdf_textpage.cpp.

◆ GetCharInfo()

const CPDF_TextPage::CharInfo & CPDF_TextPage::GetCharInfo ( size_t index) const

Definition at line 472 of file cpdf_textpage.cpp.

◆ GetCharLooseBounds()

CFX_FloatRect CPDF_TextPage::GetCharLooseBounds ( size_t index) const

Definition at line 482 of file cpdf_textpage.cpp.

◆ GetIndexAtPos()

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPageText()

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRect()

bool CPDF_TextPage::GetRect ( int rectIndex,
CFX_FloatRect * pRect ) const

Definition at line 537 of file cpdf_textpage.cpp.

Referenced by FPDFText_GetRect().

+ Here is the caller graph for this function:

◆ GetRectArray()

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

+ Here is the call graph for this function:

◆ GetTextByObject()

WideString CPDF_TextPage::GetTextByObject ( const CPDF_TextObject * pTextObj) const

Definition at line 465 of file cpdf_textpage.cpp.

Referenced by FPDFTextObj_GetText().

+ Here is the caller graph for this function:

◆ GetTextByRect()

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

+ Here is the caller graph for this function:

◆ size()

size_t CPDF_TextPage::size ( ) const
inline

Definition at line 67 of file cpdf_textpage.h.

◆ TextIndexFromCharIndex()

int CPDF_TextPage::TextIndexFromCharIndex ( int char_index) const

Definition at line 333 of file cpdf_textpage.cpp.

Referenced by FPDFText_GetTextIndexFromCharIndex(), and GetPageText().

+ Here is the caller graph for this function:

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