mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-02-02 02:16:53 +01:00
Editor plugin: Bugfixing
This commit is contained in:
parent
ba0dd9e891
commit
72962f2513
@ -170,6 +170,11 @@ void PDFPageContentEditorEditedItemSettings::loadFromElement(PDFPageContentEleme
|
|||||||
QPen pen = pdf::PDFPainterHelper::createPenFromState(&graphicState, graphicState.getAlphaStroking());
|
QPen pen = pdf::PDFPainterHelper::createPenFromState(&graphicState, graphicState.getAlphaStroking());
|
||||||
QBrush brush = pdf::PDFPainterHelper::createBrushFromState(&graphicState, graphicState.getAlphaFilling());
|
QBrush brush = pdf::PDFPainterHelper::createBrushFromState(&graphicState, graphicState.getAlphaFilling());
|
||||||
|
|
||||||
|
if (element->asText())
|
||||||
|
{
|
||||||
|
pen.setColor(brush.color());
|
||||||
|
}
|
||||||
|
|
||||||
setPen(pen, true);
|
setPen(pen, true);
|
||||||
setBrush(brush, true);
|
setBrush(brush, true);
|
||||||
}
|
}
|
||||||
@ -247,7 +252,7 @@ void PDFPageContentEditorEditedItemSettings::saveToElement(PDFPageContentElement
|
|||||||
QTransform transform = PDFPainterHelper::composeTransform(decomposedTransformation);
|
QTransform transform = PDFPainterHelper::composeTransform(decomposedTransformation);
|
||||||
editedElement->getElement()->setTransform(transform);
|
editedElement->getElement()->setTransform(transform);
|
||||||
|
|
||||||
if (editedElement->getElement()->asText() || editedElement->getElement()->asPath())
|
if (editedElement->getElement()->asPath())
|
||||||
{
|
{
|
||||||
PDFPageContentProcessorState graphicState = editedElement->getElement()->getState();
|
PDFPageContentProcessorState graphicState = editedElement->getElement()->getState();
|
||||||
|
|
||||||
@ -256,6 +261,16 @@ void PDFPageContentEditorEditedItemSettings::saveToElement(PDFPageContentElement
|
|||||||
|
|
||||||
editedElement->getElement()->setState(graphicState);
|
editedElement->getElement()->setState(graphicState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (editedElement->getElement()->asText())
|
||||||
|
{
|
||||||
|
PDFPageContentProcessorState graphicState = editedElement->getElement()->getState();
|
||||||
|
|
||||||
|
QBrush brush(m_pen.color(), Qt::SolidPattern);
|
||||||
|
PDFPainterHelper::applyBrushToGraphicState(&graphicState, brush);
|
||||||
|
|
||||||
|
editedElement->getElement()->setState(graphicState);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int PDF_gcd(int a, int b)
|
static int PDF_gcd(int a, int b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user