Editor plugin: Bugfixing

This commit is contained in:
Jakub Melka
2024-06-09 17:38:44 +02:00
parent efc6ab98da
commit f78fb54607
5 changed files with 78 additions and 10 deletions

View File

@ -2618,8 +2618,10 @@ void PDFPageContentElementEdited::drawPage(QPainter* painter,
if (const PDFEditedPageContentElementPath* pathElement = m_element->asPath())
{
const PDFPageContentProcessorState& state = m_element->getState();
painter->setPen(pdf::PDFPainterHelper::createPenFromState(&state, state.getAlphaStroking()));
painter->setBrush(pdf::PDFPainterHelper::createBrushFromState(&state, state.getAlphaFilling()));
QPen pen = pdf::PDFPainterHelper::createPenFromState(&state, state.getAlphaStroking());
QBrush brush = pdf::PDFPainterHelper::createBrushFromState(&state, state.getAlphaFilling());
painter->setPen(pathElement->getStrokePath() ? pen : QPen(Qt::NoPen));
painter->setBrush(pathElement->getFillPath() ? brush : QBrush(Qt::NoBrush));
painter->drawPath(pathElement->getPath());
}