r18127 by jghali - #11403 (inaccurate on screen gradient display) : additional fixes
scribus-commit
scribus-commit at lists.scribus.net
Wed Feb 6 22:57:06 UTC 2013
Author: jghali
Date: Wed Feb 6 22:57:06 2013
New Revision: 18127
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18127
Log:
#11403 (inaccurate on screen gradient display) : additional fixes
Modified:
branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
Modified: branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18127&path=/branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/ai/importai.cpp Wed Feb 6 22:57:06 2013
@@ -2007,14 +2007,16 @@
else if (colortype == 3)
{
stopName = parseCustomColor(Cdata, colorShade);
+ int stopShade = qRound(colorShade);
const ScColor& gradC = m_Doc->PageColors[stopName];
- currentGradient.addStop( ScColorEngine::getRGBColor(gradC, m_Doc), stop, 0.5, 1.0, stopName, qRound(colorShade));
+ currentGradient.addStop( ScColorEngine::getShadeColor(gradC, m_Doc, stopShade), stop, 0.5, 1.0, stopName, stopShade);
}
else if (colortype == 4)
{
stopName = parseCustomColorX(Cdata, colorShade, "0");
+ int stopShade = qRound(colorShade);
const ScColor& gradC = m_Doc->PageColors[stopName];
- currentGradient.addStop( ScColorEngine::getRGBColor(gradC, m_Doc), stop, 0.5, 1.0, stopName, qRound(colorShade));
+ currentGradient.addStop( ScColorEngine::getShadeColor(gradC, m_Doc, stopShade), stop, 0.5, 1.0, stopName, stopShade);
}
}
else if (command == "BD")
Modified: branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18127&path=/branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Wed Feb 6 22:57:06 2013
@@ -1013,13 +1013,13 @@
{
const ScColor& col1 = m_Doc->PageColors[c];
const ScColor& col2 = m_Doc->PageColors[c2];
- oostyle.gradient.addStop( ScColorEngine::getRGBColor(col2, m_Doc), 0.0, 0.5, 1, c2, shadeE );
- oostyle.gradient.addStop( ScColorEngine::getRGBColor(col1, m_Doc), 1.0 - border, 0.5, 1, c, shadeS );
+ oostyle.gradient.addStop( ScColorEngine::getShadeColor(col2, m_Doc, shadeE), 0.0, 0.5, 1, c2, shadeE );
+ oostyle.gradient.addStop( ScColorEngine::getShadeColor(col1, m_Doc, shadeS), 1.0 - border, 0.5, 1, c, shadeS );
}
else
{
- oostyle.gradient.addStop( ScColorEngine::getRGBColor(col1, m_Doc), border, 0.5, 1, c, shadeS );
- oostyle.gradient.addStop( ScColorEngine::getRGBColor(col2, m_Doc), 1.0, 0.5, 1, c2, shadeE );
+ oostyle.gradient.addStop( ScColorEngine::getShadeColor(col1, m_Doc, shadeS), border, 0.5, 1, c, shadeS );
+ oostyle.gradient.addStop( ScColorEngine::getShadeColor(col2, m_Doc, shadeE), 1.0, 0.5, 1, c2, shadeE );
}
}
}
More information about the scribus-commit
mailing list