Refactoring, element rendering

This commit is contained in:
Jakub Melka
2024-04-01 16:38:02 +02:00
parent 379fddcc83
commit 34f64c3a85
8 changed files with 216 additions and 98 deletions

View File

@ -24,6 +24,7 @@
namespace pdf
{
class PDFPageContentProcessorState;
/// RAII wrapper for painter save/restore
class PDFPainterStateGuard
@ -55,6 +56,12 @@ public:
/// \param text Text inside the bubble
/// \param alignment Bubble alignment relative to the bubble position point
static QRect drawBubble(QPainter* painter, QPoint point, QColor color, QString text, Qt::Alignment alignment);
/// Creates pen from painter graphicState
static QPen createPenFromState(const PDFPageContentProcessorState* graphicState, double alpha);
/// Creates brush from painter graphicState
static QBrush createBrushFromState(const PDFPageContentProcessorState* graphicState, double alpha);
};
} // namespace pdf