Redact tool - basic functionality, create redaction annotations

This commit is contained in:
Jakub Melka
2020-12-26 17:59:06 +01:00
parent 8760a5ff17
commit 890b5e0e1c
19 changed files with 1815 additions and 342 deletions

View File

@ -313,7 +313,7 @@ bool PDFTextLayout::isHoveringOverTextBlock(const QPointF& point) const
return false;
}
PDFTextSelection PDFTextLayout::createTextSelection(PDFInteger pageIndex, const QPointF& point1, const QPointF& point2)
PDFTextSelection PDFTextLayout::createTextSelection(PDFInteger pageIndex, const QPointF& point1, const QPointF& point2, QColor selectionColor)
{
PDFTextSelection selection;
@ -448,11 +448,11 @@ PDFTextSelection PDFTextLayout::createTextSelection(PDFInteger pageIndex, const
{
if (ptrA < ptrB)
{
selection.addItems({ PDFTextSelectionItem(ptrA, ptrB) }, Qt::yellow);
selection.addItems({ PDFTextSelectionItem(ptrA, ptrB) }, selectionColor);
}
else
{
selection.addItems({ PDFTextSelectionItem(ptrB, ptrA) }, Qt::yellow);
selection.addItems({ PDFTextSelectionItem(ptrB, ptrA) }, selectionColor);
}
}
}