r21453 by jghali - #14292: Background colors in text areas are not printing

scribus-commit scribus-commit at lists.scribus.net
Wed Sep 21 16:56:33 UTC 2016


Author: jghali
Date: Wed Sep 21 16:56:33 2016
New Revision: 21453

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21453
Log:
#14292: Background colors in text areas are not printing

Modified:
    trunk/Scribus/scribus/scpageoutput.cpp

Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21453&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp	(original)
+++ trunk/Scribus/scribus/scpageoutput.cpp	Wed Sep 21 16:56:33 2016
@@ -1477,9 +1477,30 @@
 
 void ScPageOutput::drawItem_TextFrame( PageItem_TextFrame* item, ScPainterExBase* painter, QRect cullingArea )
 {
+	painter->save();
+
+	if ((item->fillColor() != CommonStrings::None) || (item->GrType != 0))
+	{
+		painter->setupPolygon(&item->PoLine);
+		fillPath(item, painter, cullingArea);
+	}
+	if ((item->isAnnotation()) && (item->annotation().Type() == Annotation::Button) && (!item->Pfile.isEmpty()) && (item->imageIsAvailable) && (item->imageVisible()) && (item->annotation().UseIcons()))
+	{
+		painter->save();
+		painter->setupPolygon(&item->PoLine);
+		painter->setClipPath();
+		painter->scale(item->imageXScale(), item->imageYScale());
+		painter->translate(static_cast<int>(item->imageXOffset() * item->imageXScale()), static_cast<int>(item->imageYOffset()  * item->imageYScale()));
+		if (!item->pixm.qImage().isNull())
+			painter->drawImage(&item->pixm, ScPainterExBase::rgbImages);
+		painter->restore();
+	}
+
 	ScPageOutputPainter p(item, painter, this);
 	item->textLayout.renderBackground(&p);
 	item->textLayout.render(&p);
+
+	painter->restore();
 }
 
 void ScPageOutput::drawArrow(ScPainterExBase* painter, PageItem* item, QTransform &arrowTrans, int arrowIndex)




More information about the scribus-commit mailing list