Issue #116: Navigate to text

This commit is contained in:
Jakub Melka
2023-12-02 15:40:11 +01:00
parent a892c192fc
commit 288eead65e
6 changed files with 175 additions and 70 deletions

View File

@ -32,6 +32,7 @@ namespace pdf
{
class PDFTextLayout;
class PDFTextLayoutStorage;
struct PDFCharacterPointer;
struct PDFTextCharacterInfo
{
@ -154,6 +155,18 @@ public:
void applyTransform(const QTransform& matrix);
/// Retrieves the bounding QPainterPath between two specified character positions within this block.
/// The provided character pointers must point to characters within the current block.
/// \param start A reference to the PDFCharacterPointer indicating the start character.
/// \param end A reference to the PDFCharacterPointer indicating the end character.
/// \param matrix Transformation applied to the path
/// \param heightIncreaseFactor Height increase factor for characters
/// \return QPainterPath representing the bounding path between the start and end characters.
QPainterPath getCharacterRangeBoundingPath(const PDFCharacterPointer& start,
const PDFCharacterPointer& end,
const QTransform& matrix,
PDFReal heightIncreaseFactor) const;
friend QDataStream& operator<<(QDataStream& stream, const PDFTextBlock& block);
friend QDataStream& operator>>(QDataStream& stream, PDFTextBlock& block);