r18907 by fschmid - ODG-Importer: better display of gradients.
scribus-commit
scribus-commit at lists.scribus.net
Thu Mar 13 21:29:58 UTC 2014
Author: fschmid
Date: Thu Mar 13 21:29:58 2014
New Revision: 18907
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18907
Log:
ODG-Importer: better display of gradients.
Modified:
trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18907&path=/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodg.cpp Thu Mar 13 21:29:58 2014
@@ -3553,6 +3553,8 @@
item->fill_gradient.addStop(ScColorEngine::getRGBColor(gradC, m_Doc), 0.0, 0.5, 1.0, gStyle.gradientEndColor, gStyle.gradientEndShade);
const ScColor& gradC2 = m_Doc->PageColors[gStyle.gradientStartColor];
item->fill_gradient.addStop(ScColorEngine::getRGBColor(gradC2, m_Doc), 1.0 - gStyle.gradientBorder, 0.5, 1.0, gStyle.gradientStartColor, gStyle.gradientStartShade);
+ if (gStyle.gradientBorder != 0)
+ item->fill_gradient.addStop(ScColorEngine::getRGBColor(gradC2, m_Doc), 1.0, 0.5, 1.0, gStyle.gradientStartColor, gStyle.gradientStartShade);
FPoint cp = FPoint(item->width() * gStyle.gradientCenterX, item->height()* gStyle.gradientCenterY);
double gLen = qMin(item->width(), item->height()) / 2.0;
QLineF p1 = QLineF(cp.x(), cp.y(), cp.x() - gLen, cp.y() - gLen);
@@ -3577,6 +3579,8 @@
const ScColor& gradC2 = m_Doc->PageColors[gStyle.gradientStartColor];
QColor gradColor2 = ScColorEngine::getRGBColor(gradC2, m_Doc);
item->fill_gradient.addStop(gradColor2, 1.0 - gStyle.gradientBorder, 0.5, 1.0, gStyle.gradientStartColor, gStyle.gradientStartShade);
+ if (gStyle.gradientBorder != 0)
+ item->fill_gradient.addStop(ScColorEngine::getRGBColor(gradC2, m_Doc), 1.0, 0.5, 1.0, gStyle.gradientStartColor, gStyle.gradientStartShade);
FPoint cp = FPoint(item->width() * gStyle.gradientCenterX, item->height()* gStyle.gradientCenterY);
double gLenW = item->width() / 2.0;
double gLenH = item->height() / 2.0;
More information about the scribus-commit
mailing list