diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index cf69b7f..9fe5a13 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -255,17 +255,17 @@ public: if (!constantAlpha) { const qreal spacing = qreal(0.02); QGradientStops newStops; - QRgb fromColor = PREMUL(stops.at(0).second.rgba()); + QRgb fromColor = qPremultiply(stops.at(0).second.rgba()); QRgb toColor; for (int i = 0; i + 1 < stops.size(); ++i) { int parts = qCeil((stops.at(i + 1).first - stops.at(i).first) / spacing); newStops.append(stops.at(i)); - toColor = PREMUL(stops.at(i + 1).second.rgba()); + toColor = qPremultiply(stops.at(i + 1).second.rgba()); if (parts > 1) { qreal step = (stops.at(i + 1).first - stops.at(i).first) / parts; for (int j = 1; j < parts; ++j) { - QRgb color = INV_PREMUL(INTERPOLATE_PIXEL_256(fromColor, 256 - 256 * j / parts, toColor, 256 * j / parts)); + QRgb color = qUnpremultiply(INTERPOLATE_PIXEL_256(fromColor, 256 - 256 * j / parts, toColor, 256 * j / parts)); newStops.append(QGradientStop(stops.at(i).first + j * step, QColor::fromRgba(color))); } }