r18125 by fschmid - Fixed Bug #11413: "Inacurate on screen gradient display", color shade was accidently applied twice for the display
scribus-commit
scribus-commit at lists.scribus.net
Wed Feb 6 20:23:39 UTC 2013
Author: fschmid
Date: Wed Feb 6 20:23:39 2013
New Revision: 18125
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18125
Log:
Fixed Bug #11413: "Inacurate on screen gradient display", color shade was accidently applied twice for the display
Modified:
branches/Version14x/Scribus/scribus/scpainter.cpp
Modified: branches/Version14x/Scribus/scribus/scpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18125&path=/branches/Version14x/Scribus/scribus/scpainter.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scpainter.cpp (original)
+++ branches/Version14x/Scribus/scribus/scpainter.cpp Wed Feb 6 20:23:39 2013
@@ -964,23 +964,15 @@
else
pat = cairo_pattern_create_radial (x1, y1, 0.1, x1, y1, sqrt(pow(x2 - x1, 2) + pow(y2 - y1,2)));
QList<VColorStop*> colorStops = fill_gradient.colorStops();
- QColor qStopColor;
for( int offset = 0 ; offset < colorStops.count() ; offset++ )
{
- qStopColor = colorStops[ offset ]->color;
rampPoint = colorStops[ offset ]->rampPoint;
if ((lastPoint == rampPoint) && (!isFirst))
continue;
isFirst = false;
- int h, s, v, sneu, vneu;
- int shad = colorStops[offset]->shade;
- qStopColor.getHsv(&h, &s, &v);
- sneu = s * shad / 100;
- vneu = 255 - ((255 - v) * shad / 100);
- qStopColor.setHsv(h, sneu, vneu);
double a = colorStops[offset]->opacity;
qreal r, g, b;
- qStopColor.getRgbF(&r, &g, &b);
+ colorStops[ offset ]->color.getRgbF(&r, &g, &b);
cairo_pattern_add_color_stop_rgba (pat, rampPoint, r, g, b, a);
lastPoint = rampPoint;
}
@@ -1087,12 +1079,6 @@
if ((lastPoint == rampPoint) && (!isFirst))
continue;
isFirst = false;
- int h, s, v, sneu, vneu;
- int shad = colorStops[offset]->shade;
- qStopColor.getHsv(&h, &s, &v);
- sneu = s * shad / 100;
- vneu = 255 - ((255 - v) * shad / 100);
- qStopColor.setHsv(h, sneu, vneu);
qStopColor.setAlphaF(colorStops[offset]->opacity);
pat.setColorAt(colorStops[ offset ]->rampPoint, qStopColor);
lastPoint = rampPoint;
More information about the scribus-commit
mailing list