summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/WEBGRADIENTS_LICENSE.txt21
-rw-r--r--src/gui/painting/painting.pri5
-rw-r--r--src/gui/painting/qbackingstore.cpp2
-rw-r--r--src/gui/painting/qblittable.cpp2
-rw-r--r--src/gui/painting/qbrush.cpp69
-rw-r--r--src/gui/painting/qbrush.h24
-rw-r--r--src/gui/painting/qcolor.cpp52
-rw-r--r--src/gui/painting/qcolor.h25
-rw-r--r--src/gui/painting/qcolorspace.cpp14
-rw-r--r--src/gui/painting/qcosmeticstroker.cpp7
-rw-r--r--src/gui/painting/qdrawhelper.cpp98
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp2
-rw-r--r--src/gui/painting/qimagescale.cpp4
-rw-r--r--src/gui/painting/qmemrotate.cpp6
-rw-r--r--src/gui/painting/qoutlinemapper.cpp2
-rw-r--r--src/gui/painting/qpagesize.cpp20
-rw-r--r--src/gui/painting/qpaintdevice.cpp6
-rw-r--r--src/gui/painting/qpaintengine.cpp12
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp96
-rw-r--r--src/gui/painting/qpaintengineex.cpp32
-rw-r--r--src/gui/painting/qpainter.cpp82
-rw-r--r--src/gui/painting/qpainter_p.h20
-rw-r--r--src/gui/painting/qpainterpath.cpp8
-rw-r--r--src/gui/painting/qpathclipper.cpp10
-rw-r--r--src/gui/painting/qpathsimplifier.cpp42
-rw-r--r--src/gui/painting/qpdf.cpp177
-rw-r--r--src/gui/painting/qpdf_p.h21
-rw-r--r--src/gui/painting/qpdfwriter.cpp46
-rw-r--r--src/gui/painting/qpdfwriter.h5
-rw-r--r--src/gui/painting/qpen.cpp2
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp8
-rw-r--r--src/gui/painting/qplatformbackingstore.h2
-rw-r--r--src/gui/painting/qrasterizer.cpp4
-rw-r--r--src/gui/painting/qregion.cpp74
-rw-r--r--src/gui/painting/qstroker.cpp10
-rw-r--r--src/gui/painting/qt_attribution.json14
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp7
-rw-r--r--src/gui/painting/qtransform.h1
-rw-r--r--src/gui/painting/qtriangulatingstroker.cpp4
-rw-r--r--src/gui/painting/qtriangulator.cpp28
-rw-r--r--src/gui/painting/webgradients.binaryjsonbin50792 -> 0 bytes
-rw-r--r--src/gui/painting/webgradients.cpp578
-rw-r--r--src/gui/painting/webgradients.css909
43 files changed, 1128 insertions, 1423 deletions
diff --git a/src/gui/painting/WEBGRADIENTS_LICENSE.txt b/src/gui/painting/WEBGRADIENTS_LICENSE.txt
deleted file mode 100644
index 1a4d527a4d..0000000000
--- a/src/gui/painting/WEBGRADIENTS_LICENSE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2017 itmeo
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index fcf6488edd..1a0f4f11e4 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -111,13 +111,8 @@ SOURCES += \
painting/qplatformbackingstore.cpp \
painting/qpathsimplifier.cpp
-webgradients.files = painting/webgradients.binaryjson
-webgradients.prefix = qgradient
-webgradients.base = painting
-
RESOURCES += \
painting/qpdf.qrc \
- webgradients
darwin {
HEADERS += painting/qcoregraphics_p.h
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index b0393aff95..0a49269c36 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -220,8 +220,6 @@ static bool isRasterSurface(QWindow *window)
to the backingstore's top level window.
You should call this function after ending painting with endPaint().
-
- \sa QWindow::transientParent()
*/
void QBackingStore::flush(const QRegion &region, QWindow *window, const QPoint &offset)
{
diff --git a/src/gui/painting/qblittable.cpp b/src/gui/painting/qblittable.cpp
index 8e2013c24f..494104251f 100644
--- a/src/gui/painting/qblittable.cpp
+++ b/src/gui/painting/qblittable.cpp
@@ -46,7 +46,7 @@ class QBlittablePrivate
{
public:
QBlittablePrivate(const QSize &size, QBlittable::Capabilities caps)
- : caps(caps), m_size(size), locked(false), cachedImg(0)
+ : caps(caps), m_size(size), locked(false), cachedImg(nullptr)
{}
QBlittable::Capabilities caps;
QSize m_size;
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp
index abb3268dfa..83032bdc4f 100644
--- a/src/gui/painting/qbrush.cpp
+++ b/src/gui/painting/qbrush.cpp
@@ -1,6 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -179,7 +180,7 @@ struct QTexturedBrushData : public QBrushData
{
QTexturedBrushData() {
m_has_pixmap_texture = false;
- m_pixmap = 0;
+ m_pixmap = nullptr;
}
~QTexturedBrushData() {
delete m_pixmap;
@@ -189,7 +190,7 @@ struct QTexturedBrushData : public QBrushData
delete m_pixmap;
if (pm.isNull()) {
- m_pixmap = 0;
+ m_pixmap = nullptr;
m_has_pixmap_texture = false;
} else {
m_pixmap = new QPixmap(pm);
@@ -202,7 +203,7 @@ struct QTexturedBrushData : public QBrushData
void setImage(const QImage &image) {
m_image = image;
delete m_pixmap;
- m_pixmap = 0;
+ m_pixmap = nullptr;
m_has_pixmap_texture = false;
}
@@ -360,7 +361,7 @@ public:
{
if (!brush->ref.deref())
delete brush;
- brush = 0;
+ brush = nullptr;
}
};
@@ -831,7 +832,7 @@ const QGradient *QBrush::gradient() const
|| d->style == Qt::ConicalGradientPattern) {
return &static_cast<const QGradientBrushData *>(d.data())->gradient;
}
- return 0;
+ return nullptr;
}
Q_GUI_EXPORT bool qt_isExtendedRadialGradient(const QBrush &brush)
@@ -968,7 +969,7 @@ bool QBrush::operator==(const QBrush &b) const
// but does not share the same data in memory. Since equality is likely to
// be used to avoid iterating over the data for a texture update, this should
// still be better than doing an accurate comparison.
- const QPixmap *us = 0, *them = 0;
+ const QPixmap *us = nullptr, *them = nullptr;
qint64 cacheKey1, cacheKey2;
if (qHasPixmapTexture(*this)) {
us = (static_cast<QTexturedBrushData *>(d.data()))->m_pixmap;
@@ -1335,7 +1336,7 @@ QDataStream &operator>>(QDataStream &s, QBrush &b)
\internal
*/
QGradient::QGradient()
- : m_type(NoGradient), dummy(0)
+ : m_type(NoGradient), dummy(nullptr)
{
}
@@ -1347,6 +1348,8 @@ QGradient::QGradient()
based on the gradients from https://webgradients.com/.
*/
+#include "webgradients.cpp"
+
/*!
\fn QGradient::QGradient(QGradient::Preset preset)
\since 5.12
@@ -1358,47 +1361,12 @@ QGradient::QGradient()
to be applied to arbitrary object sizes.
*/
QGradient::QGradient(Preset preset)
- : QGradient()
-{
- static QHash<int, QGradient> cachedPresets;
- static QMutex cacheMutex;
- QMutexLocker locker(&cacheMutex);
- if (cachedPresets.contains(preset)) {
- const QGradient &cachedPreset = cachedPresets.value(preset);
- m_type = cachedPreset.m_type;
- m_data = cachedPreset.m_data;
- m_stops = cachedPreset.m_stops;
- m_spread = cachedPreset.m_spread;
- dummy = cachedPreset.dummy;
- } else {
- static QJsonDocument jsonPresets = []() {
- QFile webGradients(QLatin1String(":/qgradient/webgradients.binaryjson"));
- webGradients.open(QFile::ReadOnly);
- return QJsonDocument::fromBinaryData(webGradients.readAll());
- }();
-
- const QJsonValue presetData = jsonPresets[preset - 1];
- if (!presetData.isObject())
- return;
-
- m_type = LinearGradient;
- setCoordinateMode(ObjectMode);
- setSpread(PadSpread);
-
- const QJsonValue start = presetData[QLatin1String("start")];
- const QJsonValue end = presetData[QLatin1String("end")];
- m_data.linear.x1 = start[QLatin1String("x")].toDouble();
- m_data.linear.y1 = start[QLatin1String("y")].toDouble();
- m_data.linear.x2 = end[QLatin1String("x")].toDouble();
- m_data.linear.y2 = end[QLatin1String("y")].toDouble();
-
- for (const QJsonValue &stop : presetData[QLatin1String("stops")].toArray()) {
- setColorAt(stop[QLatin1String("position")].toDouble(),
- QColor(QRgb(stop[QLatin1String("color")].toInt())));
- }
-
- cachedPresets.insert(preset, *this);
- }
+ : m_type(LinearGradient)
+ , m_spread(PadSpread)
+ , m_stops(qt_preset_gradient_stops(preset))
+ , m_data(qt_preset_gradient_data[preset - 1])
+ , dummy(qt_preset_gradient_dummy())
+{
}
/*!
@@ -1408,11 +1376,6 @@ QGradient::~QGradient()
{
}
-QT_END_NAMESPACE
-static void initGradientPresets() { Q_INIT_RESOURCE(qmake_webgradients); }
-Q_CONSTRUCTOR_FUNCTION(initGradientPresets);
-QT_BEGIN_NAMESPACE
-
/*!
\enum QGradient::Type
diff --git a/src/gui/painting/qbrush.h b/src/gui/painting/qbrush.h
index 6a4ffab1c5..1d7199782f 100644
--- a/src/gui/painting/qbrush.h
+++ b/src/gui/painting/qbrush.h
@@ -400,16 +400,7 @@ public:
inline bool operator!=(const QGradient &other) const
{ return !operator==(other); }
-private:
- friend class QLinearGradient;
- friend class QRadialGradient;
- friend class QConicalGradient;
- friend class QBrush;
-
- Type m_type;
- Spread m_spread;
- QGradientStops m_stops;
- union {
+ union QGradientData {
struct {
qreal x1, y1, x2, y2;
} linear;
@@ -419,7 +410,18 @@ private:
struct {
qreal cx, cy, angle;
} conical;
- } m_data;
+ };
+
+private:
+ friend class QLinearGradient;
+ friend class QRadialGradient;
+ friend class QConicalGradient;
+ friend class QBrush;
+
+ Type m_type;
+ Spread m_spread;
+ QGradientStops m_stops;
+ QGradientData m_data;
void *dummy; // ### Qt 6: replace with actual content (CoordinateMode, InterpolationMode, ...)
};
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 8780cce223..c567b25468 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -855,18 +855,6 @@ QColor::QColor(Spec spec) noexcept
*/
/*!
- Returns the name of the color in the format "#RRGGBB"; i.e. a "#"
- character followed by three two-digit hexadecimal numbers.
-
- \sa setNamedColor()
-*/
-
-QString QColor::name() const
-{
- return name(HexRgb);
-}
-
-/*!
\since 5.2
Returns the name of the color in the specified \a format.
@@ -1086,6 +1074,7 @@ void QColor::setHsvF(qreal h, qreal s, qreal v, qreal a)
|| (v < qreal(0.0) || v > qreal(1.0))
|| (a < qreal(0.0) || a > qreal(1.0))) {
qWarning("QColor::setHsvF: HSV parameters out of range");
+ invalidate();
return;
}
@@ -1198,7 +1187,8 @@ void QColor::setHslF(qreal h, qreal s, qreal l, qreal a)
|| (s < qreal(0.0) || s > qreal(1.0))
|| (l < qreal(0.0) || l > qreal(1.0))
|| (a < qreal(0.0) || a > qreal(1.0))) {
- qWarning("QColor::setHsvF: HSV parameters out of range");
+ qWarning("QColor::setHslF: HSL parameters out of range");
+ invalidate();
return;
}
@@ -1224,7 +1214,7 @@ void QColor::setHslF(qreal h, qreal s, qreal l, qreal a)
void QColor::setHsl(int h, int s, int l, int a)
{
if (h < -1 || (uint)s > 255 || (uint)l > 255 || (uint)a > 255) {
- qWarning("QColor::setHsv: HSV parameters out of range");
+ qWarning("QColor::setHsl: HSL parameters out of range");
invalidate();
return;
}
@@ -2626,16 +2616,6 @@ QColor QColor::fromHslF(qreal h, qreal s, qreal l, qreal a)
}
/*!
- \obsolete
-
- Use the \c const overload instead.
-*/
-void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a)
-{
- const_cast<const QColor *>(this)->getCmyk(c, m, y, k, a);
-}
-
-/*!
Sets the contents pointed to by \a c, \a m, \a y, \a k, and \a a, to the
cyan, magenta, yellow, black, and alpha-channel (transparency) components
of the color's CMYK value.
@@ -2665,16 +2645,6 @@ void QColor::getCmyk(int *c, int *m, int *y, int *k, int *a) const
}
/*!
- \obsolete
-
- Use the \c const overload instead.
-*/
-void QColor::getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a)
-{
- const_cast<const QColor *>(this)->getCmykF(c, m, y, k, a);
-}
-
-/*!
Sets the contents pointed to by \a c, \a m, \a y, \a k, and \a a, to the
cyan, magenta, yellow, black, and alpha-channel (transparency) components
of the color's CMYK value.
@@ -2719,6 +2689,7 @@ void QColor::setCmyk(int c, int m, int y, int k, int a)
|| k < 0 || k > 255
|| a < 0 || a > 255) {
qWarning("QColor::setCmyk: CMYK parameters out of range");
+ invalidate();
return;
}
@@ -2748,6 +2719,7 @@ void QColor::setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a)
|| k < qreal(0.0) || k > qreal(1.0)
|| a < qreal(0.0) || a > qreal(1.0)) {
qWarning("QColor::setCmykF: CMYK parameters out of range");
+ invalidate();
return;
}
@@ -2920,18 +2892,6 @@ QColor QColor::dark(int factor) const noexcept
}
#endif
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
-/*!
- Assigns a copy of \a color to this color, and returns a reference to it.
-*/
-QColor &QColor::operator=(const QColor &color) noexcept
-{
- cspec = color.cspec;
- ct.argb = color.ct.argb;
- return *this;
-}
-#endif
-
/*! \overload
Assigns a copy of \a color and returns a reference to this color.
*/
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index c3111f9e3b..ad624e6b60 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -74,10 +74,10 @@ public:
QColor(Qt::GlobalColor color) noexcept;
Q_DECL_CONSTEXPR QColor(int r, int g, int b, int a = 255) noexcept
: cspec(isRgbaValid(r, g, b, a) ? Rgb : Invalid),
- ct(cspec == Rgb ? a * 0x0101 : 0,
- cspec == Rgb ? r * 0x0101 : 0,
- cspec == Rgb ? g * 0x0101 : 0,
- cspec == Rgb ? b * 0x0101 : 0,
+ ct(ushort(cspec == Rgb ? a * 0x0101 : 0),
+ ushort(cspec == Rgb ? r * 0x0101 : 0),
+ ushort(cspec == Rgb ? g * 0x0101 : 0),
+ ushort(cspec == Rgb ? b * 0x0101 : 0),
0) {}
QColor(QRgb rgb) noexcept;
QColor(QRgba64 rgba64) noexcept;
@@ -89,24 +89,11 @@ public:
inline QColor(QLatin1String name);
QColor(Spec spec) noexcept;
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
- // ### Qt 6: remove all of these, the trivial ones are fine.
- Q_DECL_CONSTEXPR QColor(const QColor &color) noexcept
- : cspec(color.cspec), ct(color.ct)
- {}
- Q_DECL_CONSTEXPR QColor(QColor &&other) noexcept : cspec(other.cspec), ct(other.ct) {}
- QColor &operator=(QColor &&other) noexcept
- { cspec = other.cspec; ct = other.ct; return *this; }
- QColor &operator=(const QColor &) noexcept;
-#endif // Qt < 6
-
QColor &operator=(Qt::GlobalColor color) noexcept;
bool isValid() const noexcept;
- // ### Qt 6: merge overloads
- QString name() const;
- QString name(NameFormat format) const;
+ QString name(NameFormat format = HexRgb) const;
#if QT_STRINGVIEW_LEVEL < 2
void setNamedColor(const QString& name);
@@ -182,11 +169,9 @@ public:
qreal yellowF() const noexcept;
qreal blackF() const noexcept;
- void getCmyk(int *c, int *m, int *y, int *k, int *a = nullptr); // ### Qt 6: remove
void getCmyk(int *c, int *m, int *y, int *k, int *a = nullptr) const;
void setCmyk(int c, int m, int y, int k, int a = 255);
- void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = nullptr); // ### Qt 6: remove
void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = nullptr) const;
void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0);
diff --git a/src/gui/painting/qcolorspace.cpp b/src/gui/painting/qcolorspace.cpp
index 937bb505c9..0fb0e9ee33 100644
--- a/src/gui/painting/qcolorspace.cpp
+++ b/src/gui/painting/qcolorspace.cpp
@@ -422,6 +422,10 @@ QColorSpace::QColorSpace()
*/
QColorSpace::QColorSpace(NamedColorSpace namedColorSpace)
{
+ if (namedColorSpace < QColorSpace::SRgb || namedColorSpace > QColorSpace::ProPhotoRgb) {
+ qWarning() << "QColorSpace attempted constructed from invalid QColorSpace::NamedColorSpace: " << int(namedColorSpace);
+ return;
+ }
static QColorSpacePrivate *predefinedColorspacePrivates[QColorSpace::ProPhotoRgb + 1];
if (!predefinedColorspacePrivates[namedColorSpace]) {
predefinedColorspacePrivates[namedColorSpace] = new QColorSpacePrivate(namedColorSpace);
@@ -784,10 +788,12 @@ QDebug operator<<(QDebug dbg, const QColorSpace &colorSpace)
QDebugStateSaver saver(dbg);
dbg.nospace();
dbg << "QColorSpace(";
- if (colorSpace.d_ptr->namedColorSpace)
- dbg << colorSpace.d_ptr->namedColorSpace << ", ";
- dbg << colorSpace.primaries() << ", " << colorSpace.transferFunction();
- dbg << ", gamma=" << colorSpace.gamma();
+ if (colorSpace.d_ptr) {
+ if (colorSpace.d_ptr->namedColorSpace)
+ dbg << colorSpace.d_ptr->namedColorSpace << ", ";
+ dbg << colorSpace.primaries() << ", " << colorSpace.transferFunction();
+ dbg << ", gamma=" << colorSpace.gamma();
+ }
dbg << ')';
return dbg;
}
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 0fb89a75b5..9012119516 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -225,7 +225,7 @@ static StrokeLine strokeLine(int strokeSelection)
break;
default:
Q_ASSERT(false);
- stroke = 0;
+ stroke = nullptr;
}
return stroke;
}
@@ -252,8 +252,8 @@ void QCosmeticStroker::setup()
const QVector<qreal> &penPattern = state->lastPen.dashPattern();
if (penPattern.isEmpty()) {
Q_ASSERT(!pattern && !reversePattern);
- pattern = 0;
- reversePattern = 0;
+ pattern = nullptr;
+ reversePattern = nullptr;
patternLength = 0;
patternSize = 0;
} else {
@@ -375,6 +375,7 @@ void QCosmeticStroker::drawLine(const QPointF &p1, const QPointF &p2)
patternOffset = state->lastPen.dashOffset()*64;
lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
stroke(this, start.x(), start.y(), end.x(), end.y(), drawCaps ? CapBegin|CapEnd : 0);
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index e8d129d047..2d4045fe29 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -310,7 +310,7 @@ inline void QT_FASTCALL storePixel<QPixelLayout::BPP24>(uchar *dest, int index,
typedef uint (QT_FASTCALL *FetchPixelFunc)(const uchar *src, int index);
static const FetchPixelFunc qFetchPixel[QPixelLayout::BPPCount] = {
- 0, // BPPNone
+ nullptr, // BPPNone
fetchPixel<QPixelLayout::BPP1MSB>, // BPP1MSB
fetchPixel<QPixelLayout::BPP1LSB>, // BPP1LSB
fetchPixel<QPixelLayout::BPP8>, // BPP8
@@ -1713,10 +1713,10 @@ static uint *QT_FASTCALL destFetchUndefined(uint *buffer, QRasterBuffer *, int,
static DestFetchProc destFetchProc[QImage::NImageFormats] =
{
- 0, // Format_Invalid
+ nullptr, // Format_Invalid
destFetchMono, // Format_Mono,
destFetchMonoLsb, // Format_MonoLSB
- 0, // Format_Indexed8
+ nullptr, // Format_Indexed8
destFetchARGB32P, // Format_RGB32
destFetch, // Format_ARGB32,
destFetchARGB32P, // Format_ARGB32_Premultiplied
@@ -1764,10 +1764,10 @@ static QRgba64 * QT_FASTCALL destFetch64Undefined(QRgba64 *buffer, QRasterBuffer
static DestFetchProc64 destFetchProc64[QImage::NImageFormats] =
{
- 0, // Format_Invalid
- 0, // Format_Mono,
- 0, // Format_MonoLSB
- 0, // Format_Indexed8
+ nullptr, // Format_Invalid
+ nullptr, // Format_Mono,
+ nullptr, // Format_MonoLSB
+ nullptr, // Format_Indexed8
destFetch64, // Format_RGB32
destFetch64, // Format_ARGB32,
destFetch64, // Format_ARGB32_Premultiplied
@@ -1905,13 +1905,13 @@ static void QT_FASTCALL destStore(QRasterBuffer *rasterBuffer, int x, int y, con
static DestStoreProc destStoreProc[QImage::NImageFormats] =
{
- 0, // Format_Invalid
+ nullptr, // Format_Invalid
destStoreMono, // Format_Mono,
destStoreMonoLsb, // Format_MonoLSB
- 0, // Format_Indexed8
- 0, // Format_RGB32
+ nullptr, // Format_Indexed8
+ nullptr, // Format_RGB32
destStore, // Format_ARGB32,
- 0, // Format_ARGB32_Premultiplied
+ nullptr, // Format_ARGB32_Premultiplied
destStoreRGB16, // Format_RGB16
destStore, // Format_ARGB8565_Premultiplied
destStore, // Format_RGB666
@@ -1955,10 +1955,10 @@ static void QT_FASTCALL destStore64RGBA64(QRasterBuffer *rasterBuffer, int x, in
static DestStoreProc64 destStoreProc64[QImage::NImageFormats] =
{
- 0, // Format_Invalid
- 0, // Format_Mono,
- 0, // Format_MonoLSB
- 0, // Format_Indexed8
+ nullptr, // Format_Invalid
+ nullptr, // Format_Mono,
+ nullptr, // Format_MonoLSB
+ nullptr, // Format_Indexed8
destStore64, // Format_RGB32
destStore64, // Format_ARGB32,
destStore64, // Format_ARGB32_Premultiplied
@@ -1980,9 +1980,9 @@ static DestStoreProc64 destStoreProc64[QImage::NImageFormats] =
destStore64, // Format_A2RGB30_Premultiplied
destStore64, // Format_Alpha8
destStore64, // Format_Grayscale8
- 0, // Format_RGBX64
+ nullptr, // Format_RGBX64
destStore64RGBA64, // Format_RGBA64
- 0, // Format_RGBA64_Premultiplied
+ nullptr, // Format_RGBA64_Premultiplied
destStore64, // Format_Grayscale16
destStore64, // Format_BGR888
};
@@ -3627,9 +3627,9 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
#endif
fetcher(sbuf1, sbuf2, len, data->texture, fx, fy, fdx, fdy);
- layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, nullptr);
if (disty)
- layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, nullptr);
for (int i = 0; i < len; ++i) {
int distx = (fx & 0x0000ffff);
@@ -3662,8 +3662,8 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
fetcher(sbuf1, sbuf2, len, data->texture, fx, fy, fdx, fdy);
- layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, 0);
- layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, nullptr);
+ layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, nullptr);
for (int i = 0; i < len; ++i) {
int distx = (fx & 0x0000ffff);
@@ -3727,8 +3727,8 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64_uint32(QRgba64 *buf
fw += fdw;
}
- layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, 0);
- layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, 0);
+ layout->convertToRGBA64PM(buf1, sbuf1, len * 2, clut, nullptr);
+ layout->convertToRGBA64PM(buf2, sbuf2, len * 2, clut, nullptr);
for (int i = 0; i < len; ++i) {
int distx = distxs[i];
@@ -3907,7 +3907,7 @@ static const QRgba64 *QT_FASTCALL fetchTransformedBilinear64(QRgba64 *buffer, co
// FetchUntransformed can have more specialized methods added depending on SIMD features.
static SourceFetchProc sourceFetchUntransformed[QImage::NImageFormats] = {
- 0, // Invalid
+ nullptr, // Invalid
fetchUntransformed, // Mono
fetchUntransformed, // MonoLsb
fetchUntransformed, // Indexed8
@@ -4348,9 +4348,9 @@ static inline Operator getOperator(const QSpanData *data, const QSpan *spans, in
switch(data->type) {
case QSpanData::Solid:
solidSource = data->solidColor.isOpaque();
- op.srcFetch = 0;
+ op.srcFetch = nullptr;
#if QT_CONFIG(raster_64bit)
- op.srcFetch64 = 0;
+ op.srcFetch64 = nullptr;
#endif
break;
case QSpanData::LinearGradient:
@@ -4721,7 +4721,7 @@ struct QBlendBase
QBlendBase(QSpanData *d, const Operator &o)
: data(d)
, op(o)
- , dest(0)
+ , dest(nullptr)
{
}
@@ -6048,7 +6048,11 @@ static inline void alphargbblend_argb32(quint32 *dst, uint coverage, const QRgba
// Give up and do a naive gray alphablend. Needed to deal with ARGB32 and invalid ARGB32_premultiplied, see QTBUG-60571
blend_pixel(*dst, src, qRgbAvg(coverage));
} else if (!colorProfile) {
- *dst = rgbBlend(*dst, src, coverage);
+ // First do naive blend with text-color
+ QRgb s = *dst;
+ blend_pixel(s, src);
+ // Then a naive blend with glyph shape
+ *dst = rgbBlend(*dst, s, coverage);
} else if (srcLinear.isOpaque()) {
rgbBlendPixel(dst, coverage, srcLinear, colorProfile);
} else {
@@ -6397,21 +6401,21 @@ static void qt_rectfill_quint64(QRasterBuffer *rasterBuffer,
DrawHelper qDrawHelper[QImage::NImageFormats] =
{
// Format_Invalid,
- { 0, 0, 0, 0, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr },
// Format_Mono,
{
blend_color_generic,
- 0, 0, 0, 0
+ nullptr, nullptr, nullptr, nullptr
},
// Format_MonoLSB,
{
blend_color_generic,
- 0, 0, 0, 0
+ nullptr, nullptr, nullptr, nullptr
},
// Format_Indexed8,
{
blend_color_generic,
- 0, 0, 0, 0
+ nullptr, nullptr, nullptr, nullptr
},
// Format_RGB32,
{
@@ -6448,7 +6452,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB8565_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6456,7 +6460,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB666
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6464,7 +6468,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB6666_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6472,7 +6476,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB555
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6480,7 +6484,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB8555_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6488,7 +6492,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB888
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
@@ -6496,7 +6500,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGB444
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6504,7 +6508,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_ARGB4444_Premultiplied
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6568,7 +6572,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Alpha8
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_alpha
@@ -6576,7 +6580,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Grayscale8
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_gray
@@ -6584,7 +6588,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBX64
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
@@ -6592,7 +6596,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA64
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
@@ -6600,7 +6604,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_RGBA64_Premultiplied
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint64
@@ -6608,7 +6612,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_Grayscale16
{
blend_color_generic_rgb64,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint16
@@ -6616,7 +6620,7 @@ DrawHelper qDrawHelper[QImage::NImageFormats] =
// Format_BGR888
{
blend_color_generic,
- 0,
+ nullptr,
qt_alphamapblit_generic,
qt_alphargbblit_generic,
qt_rectfill_quint24
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index 0c0df0fb13..7cd700a84a 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -271,7 +271,7 @@ void QEmulationPaintEngine::fillBGRect(const QRectF &r)
{
qreal pts[] = { r.x(), r.y(), r.x() + r.width(), r.y(),
r.x() + r.width(), r.y() + r.height(), r.x(), r.y() + r.height() };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
real_engine->fill(vp, state()->bgBrush);
}
diff --git a/src/gui/painting/qimagescale.cpp b/src/gui/painting/qimagescale.cpp
index 0d7205b483..2e2f65b483 100644
--- a/src/gui/painting/qimagescale.cpp
+++ b/src/gui/painting/qimagescale.cpp
@@ -223,7 +223,7 @@ static QImageScaleInfo* QImageScale::qimageFreeScaleInfo(QImageScaleInfo *isi)
delete[] isi->yapoints;
delete isi;
}
- return 0;
+ return nullptr;
}
static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img,
@@ -238,7 +238,7 @@ static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(const QImage &img,
isi = new QImageScaleInfo;
if (!isi)
- return 0;
+ return nullptr;
isi->xup_yup = (qAbs(dw) >= sw) + ((qAbs(dh) >= sh) << 1);
diff --git a/src/gui/painting/qmemrotate.cpp b/src/gui/painting/qmemrotate.cpp
index 9cb787fb2c..685fbbb37a 100644
--- a/src/gui/painting/qmemrotate.cpp
+++ b/src/gui/painting/qmemrotate.cpp
@@ -406,9 +406,9 @@ void qt_memrotate270_64(const uchar *srcPixels, int w, int h, int sbpl, uchar *d
MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3] =
// 90, 180, 270
{
- { 0, 0, 0 }, // BPPNone,
- { 0, 0, 0 }, // BPP1MSB,
- { 0, 0, 0 }, // BPP1LSB,
+ { nullptr, nullptr, nullptr }, // BPPNone,
+ { nullptr, nullptr, nullptr }, // BPP1MSB,
+ { nullptr, nullptr, nullptr }, // BPP1LSB,
{ qt_memrotate90_8, qt_memrotate180_8, qt_memrotate270_8 }, // BPP8,
{ qt_memrotate90_16, qt_memrotate180_16, qt_memrotate270_16 }, // BPP16,
{ qt_memrotate90_24, qt_memrotate180_24, qt_memrotate270_24 }, // BPP24
diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp
index 2074f98069..67e450986d 100644
--- a/src/gui/painting/qoutlinemapper.cpp
+++ b/src/gui/painting/qoutlinemapper.cpp
@@ -209,7 +209,7 @@ void QOutlineMapper::endOutline()
elements[i] = m_transform.map(elements[i]);
} else {
const QVectorPath vp((qreal *)elements, m_elements.size(),
- m_element_types.size() ? m_element_types.data() : 0);
+ m_element_types.size() ? m_element_types.data() : nullptr);
QPainterPath path = vp.convertToPainterPath();
path = m_transform.map(path);
if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL))
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp
index c98ca8a1fb..d73a66b790 100644
--- a/src/gui/painting/qpagesize.cpp
+++ b/src/gui/painting/qpagesize.cpp
@@ -394,7 +394,7 @@ static QString qt_keyForPageSizeId(QPageSize::PageSizeId id)
}
// Return id name for PPD Key
-static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match = 0)
+static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match = nullptr)
{
if (ppdKey.isEmpty())
return QPageSize::Custom;
@@ -415,7 +415,7 @@ static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey, QSize *match
}
// Return id name for Windows ID
-static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = 0)
+static QPageSize::PageSizeId qt_idForWindowsID(int windowsId, QSize *match = nullptr)
{
// If outside known values then is Custom
if (windowsId <= DMPAPER_NONE || windowsId > DMPAPER_LAST)
@@ -770,7 +770,7 @@ QPageSizePrivate::QPageSizePrivate(const QSize &pointSize, const QString &name,
m_units(QPageSize::Point)
{
if (pointSize.isValid()) {
- QPageSize::PageSizeId id = qt_idForPointSize(pointSize, matchPolicy, 0);
+ QPageSize::PageSizeId id = qt_idForPointSize(pointSize, matchPolicy, nullptr);
id == QPageSize::Custom ? init(pointSize, name) : init(id, name);
}
}
@@ -782,7 +782,7 @@ QPageSizePrivate::QPageSizePrivate(const QSizeF &size, QPageSize::Unit units,
m_units(QPageSize::Point)
{
if (size.isValid()) {
- QPageSize::PageSizeId id = qt_idForSize(size, units, matchPolicy, 0);
+ QPageSize::PageSizeId id = qt_idForSize(size, units, matchPolicy, nullptr);
id == QPageSize::Custom ? init(size, units, name) : init(id, name);
}
}
@@ -793,10 +793,10 @@ QPageSizePrivate::QPageSizePrivate(const QString &key, const QSize &pointSize, c
m_units(QPageSize::Point)
{
if (!key.isEmpty() && pointSize.isValid()) {
- QPageSize::PageSizeId id = qt_idForPpdKey(key, 0);
+ QPageSize::PageSizeId id = qt_idForPpdKey(key, nullptr);
// If not a known PPD key, check if size is a standard PPD size
if (id == QPageSize::Custom)
- id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, 0);
+ id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, nullptr);
id == QPageSize::Custom ? init(pointSize, name) : init(id, name);
m_key = key;
}
@@ -808,10 +808,10 @@ QPageSizePrivate::QPageSizePrivate(int windowsId, const QSize &pointSize, const
m_units(QPageSize::Point)
{
if (windowsId > 0 && pointSize.isValid()) {
- QPageSize::PageSizeId id = qt_idForWindowsID(windowsId, 0);
+ QPageSize::PageSizeId id = qt_idForWindowsID(windowsId, nullptr);
// If not a known Windows ID, check if size is a standard PPD size
if (id == QPageSize::Custom)
- id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, 0);
+ id = qt_idForPointSize(pointSize, QPageSize::FuzzyMatch, nullptr);
id == QPageSize::Custom ? init(pointSize, name) : init(id, name);
m_windowsId = windowsId;
}
@@ -1753,7 +1753,7 @@ QString QPageSize::name(PageSizeId pageSizeId)
QPageSize::PageSizeId QPageSize::id(const QSize &pointSize, SizeMatchPolicy matchPolicy)
{
- return qt_idForPointSize(pointSize, matchPolicy, 0);
+ return qt_idForPointSize(pointSize, matchPolicy, nullptr);
}
/*!
@@ -1769,7 +1769,7 @@ QPageSize::PageSizeId QPageSize::id(const QSize &pointSize, SizeMatchPolicy matc
QPageSize::PageSizeId QPageSize::id(const QSizeF &size, Unit units,
SizeMatchPolicy matchPolicy)
{
- return qt_idForSize(size, units, matchPolicy, 0);
+ return qt_idForSize(size, units, matchPolicy, nullptr);
}
/*!
diff --git a/src/gui/painting/qpaintdevice.cpp b/src/gui/painting/qpaintdevice.cpp
index 0ddfba6ee9..4afb89b52e 100644
--- a/src/gui/painting/qpaintdevice.cpp
+++ b/src/gui/painting/qpaintdevice.cpp
@@ -43,7 +43,7 @@ QT_BEGIN_NAMESPACE
QPaintDevice::QPaintDevice() noexcept
{
- reserved = 0;
+ reserved = nullptr;
painters = 0;
}
@@ -67,7 +67,7 @@ void QPaintDevice::initPainter(QPainter *) const
*/
QPaintDevice *QPaintDevice::redirected(QPoint *) const
{
- return 0;
+ return nullptr;
}
/*!
@@ -75,7 +75,7 @@ QPaintDevice *QPaintDevice::redirected(QPoint *) const
*/
QPainter *QPaintDevice::sharedPainter() const
{
- return 0;
+ return nullptr;
}
Q_GUI_EXPORT int qt_paint_device_metric(const QPaintDevice *device, QPaintDevice::PaintDeviceMetric metric)
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index bfe1c9cadf..1785fcd12d 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -305,7 +305,7 @@ void QPaintEngine::syncState()
static_cast<QPaintEngineEx *>(this)->sync();
}
-static QPaintEngine *qt_polygon_recursion = 0;
+static QPaintEngine *qt_polygon_recursion = nullptr;
struct QT_Point {
int x;
int y;
@@ -334,7 +334,7 @@ void QPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDra
p[i].y = qRound(points[i].y());
}
drawPolygon((QPoint *)p.data(), pointCount, mode);
- qt_polygon_recursion = 0;
+ qt_polygon_recursion = nullptr;
}
struct QT_PointF {
@@ -363,7 +363,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw
p[i].y = points[i].y();
}
drawPolygon((QPointF *)p.data(), pointCount, mode);
- qt_polygon_recursion = 0;
+ qt_polygon_recursion = nullptr;
}
/*!
@@ -691,7 +691,7 @@ void QPaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF
*/
QPaintEngine::QPaintEngine(PaintEngineFeatures caps)
- : state(0),
+ : state(nullptr),
gccaps(caps),
active(0),
selfDestruct(false),
@@ -706,7 +706,7 @@ QPaintEngine::QPaintEngine(PaintEngineFeatures caps)
*/
QPaintEngine::QPaintEngine(QPaintEnginePrivate &dptr, PaintEngineFeatures caps)
- : state(0),
+ : state(nullptr),
gccaps(caps),
active(0),
selfDestruct(false),
@@ -728,7 +728,7 @@ QPaintEngine::~QPaintEngine()
*/
QPainter *QPaintEngine::painter() const
{
- return state ? state->painter() : 0;
+ return state ? state->painter() : nullptr;
}
/*!
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 40c822076b..bc65ed56e3 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -115,17 +115,17 @@ public:
pts[7] = bottom;
}
inline QRectVectorPath(const QRect &r)
- : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+ : QVectorPath(pts, 4, nullptr, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
{
set(r);
}
inline QRectVectorPath(const QRectF &r)
- : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+ : QVectorPath(pts, 4, nullptr, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
{
set(r);
}
inline QRectVectorPath()
- : QVectorPath(pts, 4, 0, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
+ : QVectorPath(pts, 4, nullptr, QVectorPath::RectangleHint | QVectorPath::ImplicitClose)
{ }
qreal pts[8];
@@ -433,7 +433,7 @@ void QRasterPaintEngine::init()
break;
default:
qWarning("QRasterPaintEngine: unsupported target device %d\n", d->device->devType());
- d->device = 0;
+ d->device = nullptr;
return;
}
@@ -601,7 +601,7 @@ QRasterPaintEngineState::~QRasterPaintEngineState()
QRasterPaintEngineState::QRasterPaintEngineState()
{
- stroker = 0;
+ stroker = nullptr;
fillFlags = 0;
strokeFlags = 0;
@@ -621,7 +621,7 @@ QRasterPaintEngineState::QRasterPaintEngineState()
flags.tx_noshear = true;
flags.fast_images = true;
- clip = 0;
+ clip = nullptr;
flags.has_clip_ownership = false;
dirty = 0;
@@ -643,8 +643,8 @@ QRasterPaintEngineState::QRasterPaintEngineState(QRasterPaintEngineState &s)
, dirty(s.dirty)
, flag_bits(s.flag_bits)
{
- brushData.tempImage = 0;
- penData.tempImage = 0;
+ brushData.tempImage = nullptr;
+ penData.tempImage = nullptr;
flags.has_clip_ownership = false;
}
@@ -759,7 +759,7 @@ void QRasterPaintEngine::updatePen(const QPen &pen)
d->dashStroker->setDashOffset(pen.dashOffset());
s->stroker = d->dashStroker.data();
} else {
- s->stroker = 0;
+ s->stroker = nullptr;
}
ensureRasterState(); // needed because of tx_noshear...
@@ -1207,7 +1207,7 @@ static void qrasterpaintengine_state_setNoClip(QRasterPaintEngineState *s)
{
if (s->flags.has_clip_ownership)
delete s->clip;
- s->clip = 0;
+ s->clip = nullptr;
s->flags.has_clip_ownership = false;
}
@@ -1279,14 +1279,14 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// intersect with, in which case we simplify the operation to
// a replace...
Qt::ClipOperation isectOp = Qt::IntersectClip;
- if (base == 0)
+ if (base == nullptr)
isectOp = Qt::ReplaceClip;
QClipData *newClip = new QClipData(d->rasterBuffer->height());
newClip->initialize();
ClipData clipData = { base, newClip, isectOp };
ensureOutlineMapper();
- d->rasterize(d->outlineMapper->convertPath(path), qt_span_clip, &clipData, 0);
+ d->rasterize(d->outlineMapper->convertPath(path), qt_span_clip, &clipData, nullptr);
newClip->fixup();
@@ -1334,7 +1334,7 @@ bool QRasterPaintEngine::setClipRectInDeviceCoords(const QRect &r, Qt::ClipOpera
QRect clipRect = qrect_normalized(r) & d->deviceRect;
QRasterPaintEngineState *s = state();
- if (op == Qt::ReplaceClip || s->clip == 0) {
+ if (op == Qt::ReplaceClip || s->clip == nullptr) {
// No current clip, hence we intersect with sysclip and be
// done with it...
@@ -1970,7 +1970,7 @@ void QRasterPaintEngine::fillPolygon(const QPointF *points, int pointCount, Poly
}
// Compose polygon fill..,
- QVectorPath vp((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode));
ensureOutlineMapper();
QT_FT_Outline *outline = d->outlineMapper->convertPath(vp);
@@ -2011,7 +2011,7 @@ void QRasterPaintEngine::drawPolygon(const QPointF *points, int pointCount, Poly
// Do the outline...
if (s->penData.blend) {
- QVectorPath vp((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {
QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped);
stroker.setLegacyRoundingEnabled(s->flags.legacy_rounding);
@@ -2075,7 +2075,7 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg
QVarLengthArray<qreal> fpoints(count);
for (int i=0; i<count; ++i)
fpoints[i] = ((const int *) points)[i];
- QVectorPath vp((qreal *) fpoints.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath vp((qreal *) fpoints.data(), pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (s->flags.fast_pen) {
QCosmeticStroker stroker(s, d->deviceRect, d->deviceRectUnclipped);
@@ -2695,14 +2695,14 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
} else if (depth == 8) {
if (s->penData.alphamapBlit) {
s->penData.alphamapBlit(rb, rx, ry, s->penData.solidColor,
- scanline, w, h, bpl, 0, useGammaCorrection);
+ scanline, w, h, bpl, nullptr, useGammaCorrection);
return;
}
} else if (depth == 32) {
// (A)RGB Alpha mask where the alpha component is not used.
if (s->penData.alphaRGBBlit) {
s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solidColor,
- (const uint *) scanline, w, h, bpl / 4, 0, useGammaCorrection);
+ (const uint *) scanline, w, h, bpl / 4, nullptr, useGammaCorrection);
return;
}
}
@@ -2917,10 +2917,10 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
QFontEngine::GlyphFormat glyphFormat = fontEngine->glyphFormat != QFontEngine::Format_None ? fontEngine->glyphFormat : d->glyphCacheFormat;
QImageTextureGlyphCache *cache =
- static_cast<QImageTextureGlyphCache *>(fontEngine->glyphCache(0, glyphFormat, s->matrix, QColor(s->penData.solidColor)));
+ static_cast<QImageTextureGlyphCache *>(fontEngine->glyphCache(nullptr, glyphFormat, s->matrix, QColor(s->penData.solidColor)));
if (!cache) {
cache = new QImageTextureGlyphCache(glyphFormat, s->matrix, QColor(s->penData.solidColor));
- fontEngine->setGlyphCache(0, cache);
+ fontEngine->setGlyphCache(nullptr, cache);
}
cache->populate(fontEngine, numGlyphs, glyphs, positions);
@@ -3672,7 +3672,7 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
int rasterPoolSize = MINIMUM_POOL_SIZE;
uchar rasterPoolOnStack[MINIMUM_POOL_SIZE + 0xf];
uchar *rasterPoolBase = alignAddress(rasterPoolOnStack, 0xf);
- uchar *rasterPoolOnHeap = 0;
+ uchar *rasterPoolOnHeap = nullptr;
qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize);
@@ -3684,13 +3684,13 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline,
deviceRect.y() + deviceRect.height() };
QT_FT_Raster_Params rasterParams;
- rasterParams.target = 0;
+ rasterParams.target = nullptr;
rasterParams.source = outline;
rasterParams.flags = QT_FT_RASTER_FLAG_CLIP;
- rasterParams.gray_spans = 0;
- rasterParams.black_spans = 0;
- rasterParams.bit_test = 0;
- rasterParams.bit_set = 0;
+ rasterParams.gray_spans = nullptr;
+ rasterParams.black_spans = nullptr;
+ rasterParams.bit_test = nullptr;
+ rasterParams.bit_set = nullptr;
rasterParams.user = data;
rasterParams.clip_box = clip_box;
@@ -3843,10 +3843,10 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
QClipData::QClipData(int height)
{
clipSpanHeight = height;
- m_clipLines = 0;
+ m_clipLines = nullptr;
allocated = 0;
- m_spans = 0;
+ m_spans = nullptr;
xmin = xmax = ymin = ymax = 0;
count = 0;
@@ -3890,7 +3890,7 @@ void QClipData::initialize()
const int currMaxY = currMinY + rects[firstInBand].height();
while (y < currMinY) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
@@ -3922,7 +3922,7 @@ void QClipData::initialize()
Q_ASSERT(count <= allocated);
while (y < clipSpanHeight) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
@@ -3936,7 +3936,7 @@ void QClipData::initialize()
if (hasRectClip) {
int y = 0;
while (y < ymin) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
@@ -3957,19 +3957,19 @@ void QClipData::initialize()
}
while (y < clipSpanHeight) {
- m_clipLines[y].spans = 0;
+ m_clipLines[y].spans = nullptr;
m_clipLines[y].count = 0;
++y;
}
}
} QT_CATCH(...) {
free(m_spans); // have to free m_spans again or someone might think that we were successfully initialized.
- m_spans = 0;
+ m_spans = nullptr;
QT_RETHROW;
}
} QT_CATCH(...) {
free(m_clipLines); // same for clipLines
- m_clipLines = 0;
+ m_clipLines = nullptr;
QT_RETHROW;
}
}
@@ -4044,7 +4044,7 @@ void QClipData::setClipRect(const QRect &rect)
if (m_spans) {
free(m_spans);
- m_spans = 0;
+ m_spans = nullptr;
}
// qDebug() << xmin << xmax << ymin << ymax;
@@ -4074,7 +4074,7 @@ void QClipData::setClipRegion(const QRegion &region)
if (m_spans) {
free(m_spans);
- m_spans = 0;
+ m_spans = nullptr;
}
}
@@ -4532,7 +4532,7 @@ void QSpanData::init(QRasterBuffer *rb, const QRasterPaintEngine *pe)
bilinear = false;
m11 = m22 = m33 = 1.;
m12 = m13 = m21 = m23 = dx = dy = 0.0;
- clip = pe ? pe->d_func()->clip() : 0;
+ clip = pe ? pe->d_func()->clip() : nullptr;
}
Q_GUI_EXPORT extern QImage qt_imageForBrush(int brushStyle, bool invert);
@@ -4668,15 +4668,15 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
void QSpanData::adjustSpanMethods()
{
- bitmapBlit = 0;
- alphamapBlit = 0;
- alphaRGBBlit = 0;
+ bitmapBlit = nullptr;
+ alphamapBlit = nullptr;
+ alphaRGBBlit = nullptr;
- fillRect = 0;
+ fillRect = nullptr;
switch(type) {
case None:
- unclipped_blend = 0;
+ unclipped_blend = nullptr;
break;
case Solid: {
const DrawHelper &drawHelper = qDrawHelper[rasterBuffer->format];
@@ -4695,17 +4695,17 @@ void QSpanData::adjustSpanMethods()
case Texture:
unclipped_blend = qBlendTexture;
if (!texture.imageData)
- unclipped_blend = 0;
+ unclipped_blend = nullptr;
break;
}
// setup clipping
if (!unclipped_blend) {
- blend = 0;
+ blend = nullptr;
} else if (!clip) {
blend = unclipped_blend;
} else if (clip->hasRectClip) {
- blend = clip->clipRect.isEmpty() ? 0 : qt_span_fill_clipRect;
+ blend = clip->clipRect.isEmpty() ? nullptr : qt_span_fill_clipRect;
} else {
blend = qt_span_fill_clipped;
}
@@ -4748,7 +4748,7 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _
{
const QImageData *d = const_cast<QImage *>(image)->data_ptr();
if (!d || d->height == 0) {
- texture.imageData = 0;
+ texture.imageData = nullptr;
texture.width = 0;
texture.height = 0;
texture.x1 = 0;
@@ -4757,7 +4757,7 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _
texture.y2 = 0;
texture.bytesPerLine = 0;
texture.format = QImage::Format_Invalid;
- texture.colorTable = 0;
+ texture.colorTable = nullptr;
texture.hasAlpha = alpha != 256;
} else {
texture.imageData = d->data;
@@ -4779,7 +4779,7 @@ void QSpanData::initTexture(const QImage *image, int alpha, QTextureData::Type _
texture.bytesPerLine = d->bytes_per_line;
texture.format = d->format;
- texture.colorTable = (d->format <= QImage::Format_Indexed8 && !d->colortable.isEmpty()) ? &d->colortable : 0;
+ texture.colorTable = (d->format <= QImage::Format_Indexed8 && !d->colortable.isEmpty()) ? &d->colortable : nullptr;
texture.hasAlpha = image->hasAlphaChannel() || alpha != 256;
}
texture.const_alpha = alpha;
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 8314e8bc8a..5d8f89eadd 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -115,7 +115,7 @@ QVectorPath::CacheEntry *QVectorPath::addCacheData(QPaintEngineEx *engine, void
qvectorpath_cache_cleanup cleanup) const{
Q_ASSERT(!lookupCacheData(engine));
if ((m_hints & IsCachedHint) == 0) {
- m_cache = 0;
+ m_cache = nullptr;
m_hints |= IsCachedHint;
}
CacheEntry *e = new CacheEntry;
@@ -162,8 +162,8 @@ struct StrokeHandler {
QPaintEngineExPrivate::QPaintEngineExPrivate()
: dasher(&stroker),
- strokeHandler(0),
- activeStroker(0),
+ strokeHandler(nullptr),
+ activeStroker(nullptr),
strokerPen(Qt::NoPen)
{
}
@@ -211,7 +211,7 @@ void QPaintEngineExPrivate::replayClipOperations()
right, info.rectf.y(),
right, bottom,
info.rectf.x(), bottom };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
q->clip(vp, info.operation);
break;
}
@@ -418,7 +418,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
if (style == Qt::SolidLine) {
d->activeStroker = &d->stroker;
} else if (style == Qt::NoPen) {
- d->activeStroker = 0;
+ d->activeStroker = nullptr;
} else {
d->dasher.setDashPattern(pen.dashPattern());
d->dasher.setDashOffset(pen.dashOffset());
@@ -616,7 +616,7 @@ void QPaintEngineEx::clip(const QRect &r, Qt::ClipOperation op)
right, bottom,
qreal(r.x()), bottom,
qreal(r.x()), qreal(r.y()) };
- QVectorPath vp(pts, 5, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 5, nullptr, QVectorPath::RectangleHint);
clip(vp, op);
}
@@ -687,7 +687,7 @@ void QPaintEngineEx::clip(const QRegion &region, Qt::ClipOperation op)
void QPaintEngineEx::clip(const QPainterPath &path, Qt::ClipOperation op)
{
if (path.isEmpty()) {
- QVectorPath vp(0, 0);
+ QVectorPath vp(nullptr, 0);
clip(vp, op);
} else {
clip(qtVectorPathForPath(path), op);
@@ -698,7 +698,7 @@ void QPaintEngineEx::fillRect(const QRectF &r, const QBrush &brush)
{
qreal pts[] = { r.x(), r.y(), r.x() + r.width(), r.y(),
r.x() + r.width(), r.y() + r.height(), r.x(), r.y() + r.height() };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
fill(vp, brush);
}
@@ -719,7 +719,7 @@ void QPaintEngineEx::drawRects(const QRect *rects, int rectCount)
right, bottom,
qreal(r.x()), bottom,
qreal(r.x()), qreal(r.y()) };
- QVectorPath vp(pts, 5, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 5, nullptr, QVectorPath::RectangleHint);
draw(vp);
}
}
@@ -735,7 +735,7 @@ void QPaintEngineEx::drawRects(const QRectF *rects, int rectCount)
right, bottom,
r.x(), bottom,
r.x(), r.y() };
- QVectorPath vp(pts, 5, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 5, nullptr, QVectorPath::RectangleHint);
draw(vp);
}
}
@@ -871,7 +871,7 @@ void QPaintEngineEx::drawPoints(const QPointF *points, int pointCount)
} else {
for (int i=0; i<pointCount; ++i) {
qreal pts[] = { points[i].x(), points[i].y(), points[i].x() + qreal(1/63.), points[i].y() };
- QVectorPath path(pts, 2, 0);
+ QVectorPath path(pts, 2, nullptr);
stroke(path, pen);
}
}
@@ -903,7 +903,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount)
for (int i=0; i<pointCount; ++i) {
qreal pts[] = { qreal(points[i].x()), qreal(points[i].y()),
qreal(points[i].x() +1/63.), qreal(points[i].y()) };
- QVectorPath path(pts, 2, 0);
+ QVectorPath path(pts, 2, nullptr);
stroke(path, pen);
}
}
@@ -912,7 +912,7 @@ void QPaintEngineEx::drawPoints(const QPoint *points, int pointCount)
void QPaintEngineEx::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
{
- QVectorPath path((const qreal *) points, pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath path((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (mode == PolylineMode)
stroke(path, state()->pen);
@@ -928,7 +928,7 @@ void QPaintEngineEx::drawPolygon(const QPoint *points, int pointCount, PolygonDr
for (int i=0; i<count; ++i)
pts[i] = ((const int *) points)[i];
- QVectorPath path(pts.data(), pointCount, 0, QVectorPath::polygonFlags(mode));
+ QVectorPath path(pts.data(), pointCount, nullptr, QVectorPath::polygonFlags(mode));
if (mode == PolylineMode)
stroke(path, state()->pen);
@@ -960,7 +960,7 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con
r.x() + r.width(), r.y() + r.height(),
r.x(), r.y() + r.height() };
- QVectorPath path(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath path(pts, 4, nullptr, QVectorPath::RectangleHint);
fill(path, brush);
}
@@ -1061,7 +1061,7 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem)
QFontEngine *fontEngine = staticTextItem->fontEngine();
fontEngine->addGlyphsToPath(staticTextItem->glyphs, staticTextItem->glyphPositions,
- staticTextItem->numGlyphs, &path, 0);
+ staticTextItem->numGlyphs, &path, { });
if (!path.isEmpty()) {
QPainterState *s = state();
QPainter::RenderHints oldHints = s->renderHints;
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 3ce54c20be..b0553a1ff9 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -330,7 +330,7 @@ void QPainterPrivate::detachPainterPrivate(QPainter *q)
original = new QPainterPrivate(q);
}
- d_ptrs[refcount - 1] = 0;
+ d_ptrs[refcount - 1] = nullptr;
q->restore();
q->d_ptr.take();
q->d_ptr.reset(original);
@@ -338,7 +338,7 @@ void QPainterPrivate::detachPainterPrivate(QPainter *q)
if (emulationEngine) {
extended = emulationEngine->real_engine;
delete emulationEngine;
- emulationEngine = 0;
+ emulationEngine = nullptr;
}
}
@@ -1404,8 +1404,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
cases where expensive operations are ok to use, for instance when
the result is cached in a QPixmap.
- \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example},
- {Drawing Utility Functions}
+ \sa QPaintDevice, QPaintEngine, {Qt SVG}, {Basic Drawing Example}, {<qdrawutil.h>}{Drawing Utility Functions}
*/
/*!
@@ -1485,9 +1484,9 @@ QPainter::QPainter()
*/
QPainter::QPainter(QPaintDevice *pd)
- : d_ptr(0)
+ : d_ptr(nullptr)
{
- Q_ASSERT(pd != 0);
+ Q_ASSERT(pd != nullptr);
if (!QPainterPrivate::attachPainterPrivate(this, pd)) {
d_ptr.reset(new QPainterPrivate(this));
begin(pd);
@@ -1718,9 +1717,9 @@ static inline void qt_cleanup_painter_state(QPainterPrivate *d)
{
qDeleteAll(d->states);
d->states.clear();
- d->state = 0;
- d->engine = 0;
- d->device = 0;
+ d->state = nullptr;
+ d->engine = nullptr;
+ d->device = nullptr;
}
bool QPainter::begin(QPaintDevice *pd)
@@ -1769,13 +1768,13 @@ bool QPainter::begin(QPaintDevice *pd)
d->device = pd;
- d->extended = d->engine->isExtended() ? static_cast<QPaintEngineEx *>(d->engine) : 0;
+ d->extended = d->engine->isExtended() ? static_cast<QPaintEngineEx *>(d->engine) : nullptr;
if (d->emulationEngine)
d->emulationEngine->real_engine = d->extended;
// Setup new state...
Q_ASSERT(!d->state);
- d->state = d->extended ? d->extended->createState(0) : new QPainterState;
+ d->state = d->extended ? d->extended->createState(nullptr) : new QPainterState;
d->state->painter = this;
d->states.push_back(d->state);
@@ -1915,11 +1914,11 @@ bool QPainter::end()
if (d->engine->isActive()) {
ended = d->engine->end();
- d->updateState(0);
+ d->updateState(nullptr);
--d->device->painters;
if (d->device->painters == 0) {
- d->engine->setPaintDevice(0);
+ d->engine->setPaintDevice(nullptr);
d->engine->setActive(false);
}
}
@@ -1935,11 +1934,11 @@ bool QPainter::end()
if (d->emulationEngine) {
delete d->emulationEngine;
- d->emulationEngine = 0;
+ d->emulationEngine = nullptr;
}
if (d->extended) {
- d->extended = 0;
+ d->extended = nullptr;
}
qt_cleanup_painter_state(d);
@@ -2761,7 +2760,7 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
right, rect.y(),
right, bottom,
rect.x(), bottom };
- QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
+ QVectorPath vp(pts, 4, nullptr, QVectorPath::RectangleHint);
d->state->clipEnabled = true;
d->extended->clip(vp, op);
if (op == Qt::ReplaceClip || op == Qt::NoClip)
@@ -5642,7 +5641,7 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio
QFixed width = rightMost - leftMost;
- if (extended != 0 && state->matrix.isAffine()) {
+ if (extended != nullptr && state->matrix.isAffine()) {
QStaticTextItem staticTextItem;
staticTextItem.color = state->pen.color();
staticTextItem.font = state->font;
@@ -5685,7 +5684,7 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio
drawTextItemDecoration(q, QPointF(leftMost.toReal(), baseLine.toReal()),
fontEngine,
- 0, // textEngine
+ nullptr, // textEngine
(underline
? QTextCharFormat::SingleUnderline
: QTextCharFormat::NoUnderline),
@@ -5781,7 +5780,7 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText
// If we don't have an extended paint engine, if the painter is projected,
// or if the font engine does not support the matrix, we go through standard
// code path
- if (d->extended == 0
+ if (d->extended == nullptr
|| !d->state->matrix.isAffine()
|| !fe->supportsTransformation(d->state->matrix)) {
staticText_d->paintText(topLeftPosition, this, pen().color());
@@ -5902,7 +5901,7 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif
int numGlyphs = len;
QVarLengthGlyphLayoutArray glyphs(len);
QFontEngine *fontEngine = d->state->font.d->engineForScript(QChar::Script_Common);
- if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, 0))
+ if (!fontEngine->stringToCMap(str.data(), len, &glyphs, &numGlyphs, { }))
Q_UNREACHABLE();
QTextItemInt gf(glyphs, &d->state->font, str.data(), len, fontEngine);
@@ -5981,7 +5980,7 @@ void QPainter::drawText(const QRect &r, int flags, const QString &str, QRect *br
d->updateState(d->state);
QRectF bounds;
- qt_format_text(d->state->font, r, flags, 0, str, br ? &bounds : 0, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, flags, nullptr, str, br ? &bounds : nullptr, 0, nullptr, 0, this);
if (br)
*br = bounds.toAlignedRect();
}
@@ -6067,7 +6066,7 @@ void QPainter::drawText(const QRectF &r, int flags, const QString &str, QRectF *
if (!d->extended)
d->updateState(d->state);
- qt_format_text(d->state->font, r, flags, 0, str, br, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, flags, nullptr, str, br, 0, nullptr, 0, this);
}
/*!
@@ -6185,7 +6184,7 @@ void QPainter::drawText(const QRectF &r, const QString &text, const QTextOption
if (!d->extended)
d->updateState(d->state);
- qt_format_text(d->state->font, r, 0, &o, text, 0, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, 0, &o, text, nullptr, 0, nullptr, 0, this);
}
/*!
@@ -6404,7 +6403,7 @@ Q_GUI_EXPORT void qt_draw_decoration_for_glyphs(QPainter *painter, const glyph_t
}
QFixed width = rightMost - leftMost;
- QTextItem::RenderFlags flags = 0;
+ QTextItem::RenderFlags flags;
if (font.underline())
flags |= QTextItem::Underline;
@@ -6415,7 +6414,7 @@ Q_GUI_EXPORT void qt_draw_decoration_for_glyphs(QPainter *painter, const glyph_t
drawTextItemDecoration(painter, QPointF(leftMost.toReal(), baseLine.toReal()),
fontEngine,
- 0, // textEngine
+ nullptr, // textEngine
font.underline() ? QTextCharFormat::SingleUnderline
: QTextCharFormat::NoUnderline, flags,
width.toReal(), charFormat);
@@ -6425,7 +6424,7 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &ti)
{
Q_D(QPainter);
- d->drawTextItem(p, ti, static_cast<QTextEngine *>(0));
+ d->drawTextItem(p, ti, static_cast<QTextEngine *>(nullptr));
}
void QPainterPrivate::drawTextItem(const QPointF &p, const QTextItem &_ti, QTextEngine *textEngine)
@@ -6682,7 +6681,7 @@ QRectF QPainter::boundingRect(const QRectF &r, const QString &text, const QTextO
return QRectF(r.x(),r.y(), 0,0);
QRectF br;
- qt_format_text(d->state->font, r, Qt::TextDontPrint, &o, text, &br, 0, 0, 0, this);
+ qt_format_text(d->state->font, r, Qt::TextDontPrint, &o, text, &br, 0, nullptr, 0, this);
return br;
}
@@ -7213,7 +7212,7 @@ QPainter::RenderHints QPainter::renderHints() const
Q_D(const QPainter);
if (!d->engine)
- return 0;
+ return { };
return d->state->renderHints;
}
@@ -7429,7 +7428,7 @@ void QPainter::setRedirected(const QPaintDevice *device,
QPaintDevice *replacement,
const QPoint &offset)
{
- Q_ASSERT(device != 0);
+ Q_ASSERT(device != nullptr);
Q_UNUSED(device)
Q_UNUSED(replacement)
Q_UNUSED(offset)
@@ -7480,7 +7479,7 @@ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset)
{
Q_UNUSED(device)
Q_UNUSED(offset)
- return 0;
+ return nullptr;
}
#endif
@@ -7490,7 +7489,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
QPainter *painter)
{
qt_format_text(fnt, _r,
- tf, 0, str, brect,
+ tf, nullptr, str, brect,
tabstops, ta, tabarraylen,
painter);
}
@@ -7500,7 +7499,7 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
QPainter *painter)
{
- Q_ASSERT( !((tf & ~Qt::TextDontPrint)!=0 && option!=0) ); // we either have an option or flags
+ Q_ASSERT( !((tf & ~Qt::TextDontPrint)!=0 && option!=nullptr) ); // we either have an option or flags
if (option) {
tf |= option->alignment();
@@ -7786,16 +7785,9 @@ QPainterState::QPainterState(const QPainterState *s)
}
QPainterState::QPainterState()
- : brushOrigin(0, 0), bgBrush(Qt::white), clipOperation(Qt::NoClip),
- renderHints(0),
- wx(0), wy(0), ww(0), wh(0), vx(0), vy(0), vw(0), vh(0),
- opacity(1), WxF(false), VxF(false), clipEnabled(true),
- bgMode(Qt::TransparentMode), painter(0),
- layoutDirection(QGuiApplication::layoutDirection()),
- composition_mode(QPainter::CompositionMode_SourceOver),
- emulationSpecifier(0), changeFlags(0)
+ : brushOrigin(0, 0), WxF(false), VxF(false), clipEnabled(true),
+ layoutDirection(QGuiApplication::layoutDirection())
{
- dirtyFlags = 0;
}
QPainterState::~QPainterState()
@@ -7824,9 +7816,9 @@ void QPainterState::init(QPainter *p) {
layoutDirection = QGuiApplication::layoutDirection();
composition_mode = QPainter::CompositionMode_SourceOver;
emulationSpecifier = 0;
- dirtyFlags = 0;
+ dirtyFlags = { };
changeFlags = 0;
- renderHints = 0;
+ renderHints = { };
opacity = 1;
}
@@ -7883,7 +7875,7 @@ void QPainterState::init(QPainter *p) {
/*!
\fn void QPainter::drawImage(const QPointF &point, const QImage &image, const QRectF &source,
- Qt::ImageConversionFlags flags = 0)
+ Qt::ImageConversionFlags flags = Qt::AutoColor)
\overload
@@ -7893,7 +7885,7 @@ void QPainterState::init(QPainter *p) {
/*!
\fn void QPainter::drawImage(const QPoint &point, const QImage &image, const QRect &source,
- Qt::ImageConversionFlags flags = 0)
+ Qt::ImageConversionFlags flags = Qt::AutoColor)
\overload
Draws the rectangular portion \a source of the given \a image with
diff --git a/src/gui/painting/qpainter_p.h b/src/gui/painting/qpainter_p.h
index 29d4880eb9..285bd90502 100644
--- a/src/gui/painting/qpainter_p.h
+++ b/src/gui/painting/qpainter_p.h
@@ -154,29 +154,29 @@ public:
QFont deviceFont;
QPen pen;
QBrush brush;
- QBrush bgBrush; // background brush
+ QBrush bgBrush = Qt::white; // background brush
QRegion clipRegion;
QPainterPath clipPath;
- Qt::ClipOperation clipOperation;
+ Qt::ClipOperation clipOperation = Qt::NoClip;
QPainter::RenderHints renderHints;
QVector<QPainterClipInfo> clipInfo; // ### Make me smaller and faster to copy around...
QTransform worldMatrix; // World transformation matrix, not window and viewport
QTransform matrix; // Complete transformation matrix,
QTransform redirectionMatrix;
- int wx, wy, ww, wh; // window rectangle
- int vx, vy, vw, vh; // viewport rectangle
- qreal opacity;
+ int wx = 0, wy = 0, ww = 0, wh = 0; // window rectangle
+ int vx = 0, vy = 0, vw = 0, vh = 0; // viewport rectangle
+ qreal opacity = 1;
uint WxF:1; // World transformation
uint VxF:1; // View transformation
uint clipEnabled:1;
- Qt::BGMode bgMode;
- QPainter *painter;
+ Qt::BGMode bgMode = Qt::TransparentMode;
+ QPainter *painter = nullptr;
Qt::LayoutDirection layoutDirection;
- QPainter::CompositionMode composition_mode;
- uint emulationSpecifier;
- uint changeFlags;
+ QPainter::CompositionMode composition_mode = QPainter::CompositionMode_SourceOver;
+ uint emulationSpecifier = 0;
+ uint changeFlags = 0;
};
struct QPainterDummyState
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 1fb37ece56..17d8b863ab 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -546,7 +546,7 @@ void QPainterPath::setElementPositionAt(int i, qreal x, qreal y)
Constructs an empty QPainterPath object.
*/
QPainterPath::QPainterPath() noexcept
- : d_ptr(0)
+ : d_ptr(nullptr)
{
}
@@ -602,7 +602,7 @@ void QPainterPath::ensureData_helper()
QPainterPath::Element e = { 0, 0, QPainterPath::MoveToElement };
data->elements << e;
d_ptr.reset(data);
- Q_ASSERT(d_ptr != 0);
+ Q_ASSERT(d_ptr != nullptr);
}
/*!
@@ -1036,7 +1036,7 @@ void QPainterPath::arcMoveTo(const QRectF &rect, qreal angle)
return;
QPointF pt;
- qt_find_ellipse_coords(rect, angle, 0, &pt, 0);
+ qt_find_ellipse_coords(rect, angle, 0, &pt, nullptr);
moveTo(pt);
}
@@ -1253,7 +1253,7 @@ void QPainterPath::addText(const QPointF &point, const QFont &f, const QString &
fe->addOutlineToPath(x, y, glyphs, this,
si.analysis.bidiLevel % 2
? QTextItem::RenderFlags(QTextItem::RightToLeft)
- : QTextItem::RenderFlags(0));
+ : QTextItem::RenderFlags{});
const qreal lw = fe->lineThickness().toReal();
if (f.d->underline) {
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 924d332452..1a1b2d76e2 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -690,12 +690,12 @@ int QKdPointTree::build(int begin, int end, int depth)
if (last > begin)
m_nodes.at(last).left = &m_nodes.at(build(begin, last, depth + 1));
else
- m_nodes.at(last).left = 0;
+ m_nodes.at(last).left = nullptr;
if (last + 1 < end)
m_nodes.at(last).right = &m_nodes.at(build(last + 1, end, depth + 1));
else
- m_nodes.at(last).right = 0;
+ m_nodes.at(last).right = nullptr;
return last;
}
@@ -811,7 +811,7 @@ void QWingedEdge::intersectAndAdd()
if (isect->next) {
isect += isect->next;
} else {
- isect = 0;
+ isect = nullptr;
}
}
@@ -1535,8 +1535,8 @@ QPainterPath QPathClipper::clip(Operation operation)
if (subjectPath == clipPath)
return op == BoolSub ? QPainterPath() : subjectPath;
- bool subjectIsRect = pathToRect(subjectPath, 0);
- bool clipIsRect = pathToRect(clipPath, 0);
+ bool subjectIsRect = pathToRect(subjectPath, nullptr);
+ bool clipIsRect = pathToRect(clipPath, nullptr);
const QRectF clipBounds = clipPath.boundingRect();
const QRectF subjectBounds = subjectPath.boundingRect();
diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp
index 4251840bbc..256a2fefe7 100644
--- a/src/gui/painting/qpathsimplifier.cpp
+++ b/src/gui/painting/qpathsimplifier.cpp
@@ -378,8 +378,8 @@ private:
};
inline PathSimplifier::BoundingVolumeHierarchy::BoundingVolumeHierarchy()
- : root(0)
- , nodeBlock(0)
+ : root(nullptr)
+ , nodeBlock(nullptr)
, blockSize(0)
, firstFree(0)
{
@@ -392,7 +392,7 @@ inline PathSimplifier::BoundingVolumeHierarchy::~BoundingVolumeHierarchy()
inline void PathSimplifier::BoundingVolumeHierarchy::allocate(int nodeCount)
{
- Q_ASSERT(nodeBlock == 0);
+ Q_ASSERT(nodeBlock == nullptr);
Q_ASSERT(firstFree == 0);
nodeBlock = new Node[blockSize = nodeCount];
}
@@ -401,9 +401,9 @@ inline void PathSimplifier::BoundingVolumeHierarchy::free()
{
freeNode(root);
delete[] nodeBlock;
- nodeBlock = 0;
+ nodeBlock = nullptr;
firstFree = blockSize = 0;
- root = 0;
+ root = nullptr;
}
inline PathSimplifier::BVHNode *PathSimplifier::BoundingVolumeHierarchy::newNode()
@@ -427,7 +427,7 @@ inline void PathSimplifier::BoundingVolumeHierarchy::freeNode(Node *n)
}
inline PathSimplifier::ElementAllocator::ElementAllocator()
- : blocks(0)
+ : blocks(nullptr)
{
}
@@ -442,11 +442,11 @@ inline PathSimplifier::ElementAllocator::~ElementAllocator()
inline void PathSimplifier::ElementAllocator::allocate(int count)
{
- Q_ASSERT(blocks == 0);
+ Q_ASSERT(blocks == nullptr);
Q_ASSERT(count > 0);
blocks = (ElementBlock *)malloc(sizeof(ElementBlock) + (count - 1) * sizeof(Element));
blocks->blockSize = count;
- blocks->next = 0;
+ blocks->next = nullptr;
blocks->firstFree = 0;
}
@@ -479,7 +479,7 @@ inline void PathSimplifier::Element::flip()
qSwap(indices[i], indices[degree - i]);
}
pointingUp = !pointingUp;
- Q_ASSERT(next == 0 && previous == 0);
+ Q_ASSERT(next == nullptr && previous == nullptr);
}
PathSimplifier::PathSimplifier(const QVectorPath &path, QDataBuffer<QPoint> &vertices,
@@ -685,9 +685,9 @@ void PathSimplifier::connectElements()
QDataBuffer<Event> events(m_elements.size() * 2);
for (int i = 0; i < m_elements.size(); ++i) {
Element *element = m_elements.at(i);
- element->next = element->previous = 0;
+ element->next = element->previous = nullptr;
element->winding = 0;
- element->edgeNode = 0;
+ element->edgeNode = nullptr;
const QPoint &u = m_points->at(element->indices[0]);
const QPoint &v = m_points->at(element->indices[element->degree]);
if (u != v) {
@@ -730,7 +730,7 @@ void PathSimplifier::connectElements()
Element *element2 = event2->element;
element->edgeNode->data = event2->element;
element2->edgeNode = element->edgeNode;
- element->edgeNode = 0;
+ element->edgeNode = nullptr;
events.pop_back();
events.pop_back();
@@ -783,8 +783,8 @@ void PathSimplifier::connectElements()
Element *upperElement = m_elementAllocator.newElement();
*upperElement = *element;
upperElement->lowerIndex() = element->upperIndex() = pointIndex;
- upperElement->edgeNode = 0;
- element->next = element->previous = 0;
+ upperElement->edgeNode = nullptr;
+ element->next = element->previous = nullptr;
if (upperElement->next)
upperElement->next->previous = upperElement;
else if (upperElement->previous)
@@ -805,7 +805,7 @@ void PathSimplifier::connectElements()
RBNode *left = findElementLeftOf(event->element, bounds);
RBNode *node = m_elementList.newNode();
node->data = event->element;
- Q_ASSERT(event->element->edgeNode == 0);
+ Q_ASSERT(event->element->edgeNode == nullptr);
event->element->edgeNode = node;
m_elementList.attachAfter(left, node);
} else {
@@ -814,7 +814,7 @@ void PathSimplifier::connectElements()
Element *element = event->element;
Q_ASSERT(element->edgeNode);
m_elementList.deleteNode(element->edgeNode);
- Q_ASSERT(element->edgeNode == 0);
+ Q_ASSERT(element->edgeNode == nullptr);
}
events.pop_back();
}
@@ -870,8 +870,8 @@ void PathSimplifier::connectElements()
Q_ASSERT(i + 1 < orderedElements.size());
Element *next = orderedElements.at(i);
Element *previous = orderedElements.at(i + 1);
- Q_ASSERT(next->previous == 0);
- Q_ASSERT(previous->next == 0);
+ Q_ASSERT(next->previous == nullptr);
+ Q_ASSERT(previous->next == nullptr);
next->previous = previous;
previous->next = next;
}
@@ -893,7 +893,7 @@ void PathSimplifier::fillIndices()
m_elements.at(i)->processed = false;
for (int i = 0; i < m_elements.size(); ++i) {
Element *element = m_elements.at(i);
- if (element->processed || element->next == 0)
+ if (element->processed || element->next == nullptr)
continue;
do {
m_indices->add(element->indices[0]);
@@ -1395,13 +1395,13 @@ PathSimplifier::RBNode *PathSimplifier::findElementLeftOf(const Element *element
const QPair<RBNode *, RBNode *> &bounds)
{
if (!m_elementList.root)
- return 0;
+ return nullptr;
RBNode *current = bounds.first;
Q_ASSERT(!current || !elementIsLeftOf(element, current->data));
if (!current)
current = m_elementList.front(m_elementList.root);
Q_ASSERT(current);
- RBNode *result = 0;
+ RBNode *result = nullptr;
while (current != bounds.second && !elementIsLeftOf(element, current->data)) {
result = current;
current = m_elementList.next(current);
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index f560e1f0f0..de9fc13331 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -439,8 +439,8 @@ QByteArray QPdf::generateDashes(const QPen &pen)
static const char* const pattern_for_brush[] = {
- 0, // NoBrush
- 0, // SolidPattern
+ nullptr, // NoBrush
+ nullptr, // SolidPattern
"0 J\n"
"6 w\n"
"[] 0 d\n"
@@ -637,7 +637,7 @@ static void cubicToHook(qfixed c1x, qfixed c1y,
}
QPdf::Stroker::Stroker()
- : stream(0),
+ : stream(nullptr),
first(true),
dashStroker(&basicStroker)
{
@@ -652,7 +652,7 @@ QPdf::Stroker::Stroker()
void QPdf::Stroker::setPen(const QPen &pen, QPainter::RenderHints hints)
{
if (pen.style() == Qt::NoPen) {
- stroker = 0;
+ stroker = nullptr;
return;
}
qreal w = pen.widthF();
@@ -1390,6 +1390,18 @@ void QPdfEngine::setPdfVersion(PdfVersion version)
d->pdfVersion = version;
}
+void QPdfEngine::setDocumentXmpMetadata(const QByteArray &xmpMetadata)
+{
+ Q_D(QPdfEngine);
+ d->xmpDocumentMetadata = xmpMetadata;
+}
+
+QByteArray QPdfEngine::documentXmpMetadata() const
+{
+ Q_D(const QPdfEngine);
+ return d->xmpDocumentMetadata;
+}
+
void QPdfEngine::setPageLayout(const QPageLayout &pageLayout)
{
Q_D(QPdfEngine);
@@ -1469,7 +1481,7 @@ int QPdfEngine::metric(QPaintDevice::PaintDeviceMetric metricType) const
QPdfEnginePrivate::QPdfEnginePrivate()
: clipEnabled(false), allClipped(false), hasPen(true), hasBrush(false), simplePen(false),
pdfVersion(QPdfEngine::Version_1_4),
- outDevice(0), ownsDevice(false),
+ outDevice(nullptr), ownsDevice(false),
embedFonts(true),
grayscale(false),
m_pageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF(10, 10, 10, 10))
@@ -1477,8 +1489,8 @@ QPdfEnginePrivate::QPdfEnginePrivate()
initResources();
resolution = 1200;
currentObject = 1;
- currentPage = 0;
- stroker.stream = 0;
+ currentPage = nullptr;
+ stroker.stream = nullptr;
streampos = 0;
@@ -1520,6 +1532,8 @@ bool QPdfEngine::begin(QPaintDevice *pdev)
d->xrefPositions.clear();
d->pageRoot = 0;
+ d->embeddedfilesRoot = 0;
+ d->namesRoot = 0;
d->catalog = 0;
d->info = 0;
d->graphicsState = 0;
@@ -1547,18 +1561,26 @@ bool QPdfEngine::end()
qDeleteAll(d->fonts);
d->fonts.clear();
delete d->currentPage;
- d->currentPage = 0;
+ d->currentPage = nullptr;
if (d->outDevice && d->ownsDevice) {
d->outDevice->close();
delete d->outDevice;
- d->outDevice = 0;
+ d->outDevice = nullptr;
}
+ d->fileCache.clear();
+
setActive(false);
return true;
}
+void QPdfEngine::addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType)
+{
+ Q_D(QPdfEngine);
+ d->fileCache.push_back({fileName, data, mimeType});
+}
+
QPdfEnginePrivate::~QPdfEnginePrivate()
{
qDeleteAll(fonts);
@@ -1586,13 +1608,19 @@ void QPdfEnginePrivate::writeHeader()
int metaDataObj = -1;
int outputIntentObj = -1;
+ if (pdfVersion == QPdfEngine::Version_A1b || !xmpDocumentMetadata.isEmpty()) {
+ metaDataObj = writeXmpDcumentMetaData();
+ }
if (pdfVersion == QPdfEngine::Version_A1b) {
- metaDataObj = writeXmpMetaData();
outputIntentObj = writeOutputIntent();
}
catalog = addXrefEntry(-1);
pageRoot = requestObject();
+ if (!fileCache.isEmpty()) {
+ namesRoot = requestObject();
+ embeddedfilesRoot = requestObject();
+ }
// catalog
{
@@ -1602,10 +1630,15 @@ void QPdfEnginePrivate::writeHeader()
<< "/Type /Catalog\n"
<< "/Pages " << pageRoot << "0 R\n";
- if (pdfVersion == QPdfEngine::Version_A1b) {
- s << "/OutputIntents [" << outputIntentObj << "0 R]\n";
+ // Embedded files, if any
+ if (!fileCache.isEmpty())
+ s << "/Names " << embeddedfilesRoot << "0 R\n";
+
+ if (pdfVersion == QPdfEngine::Version_A1b || !xmpDocumentMetadata.isEmpty())
s << "/Metadata " << metaDataObj << "0 R\n";
- }
+
+ if (pdfVersion == QPdfEngine::Version_A1b)
+ s << "/OutputIntents [" << outputIntentObj << "0 R]\n";
s << ">>\n"
<< "endobj\n";
@@ -1613,6 +1646,12 @@ void QPdfEnginePrivate::writeHeader()
write(catalog);
}
+ if (!fileCache.isEmpty()) {
+ addXrefEntry(embeddedfilesRoot);
+ xprintf("<</EmbeddedFiles %d 0 R>>\n"
+ "endobj\n", namesRoot);
+ }
+
// graphics state
graphicsState = addXrefEntry(-1);
xprintf("<<\n"
@@ -1664,39 +1703,45 @@ void QPdfEnginePrivate::writeInfo()
"endobj\n");
}
-int QPdfEnginePrivate::writeXmpMetaData()
+int QPdfEnginePrivate::writeXmpDcumentMetaData()
{
const int metaDataObj = addXrefEntry(-1);
+ QByteArray metaDataContent;
+
+ if (xmpDocumentMetadata.isEmpty()) {
+ const QString producer(QString::fromLatin1("Qt " QT_VERSION_STR));
+
+ const QDateTime now = QDateTime::currentDateTime();
+ const QDate date = now.date();
+ const QTime time = now.time();
+ const QString timeStr =
+ QString::asprintf("%d-%02d-%02dT%02d:%02d:%02d",
+ date.year(), date.month(), date.day(),
+ time.hour(), time.minute(), time.second());
+
+ const int offset = now.offsetFromUtc();
+ const int hours = (offset / 60) / 60;
+ const int mins = (offset / 60) % 60;
+ QString tzStr;
+ if (offset < 0)
+ tzStr = QString::asprintf("-%02d:%02d", -hours, -mins);
+ else if (offset > 0)
+ tzStr = QString::asprintf("+%02d:%02d", hours , mins);
+ else
+ tzStr = QLatin1String("Z");
- const QString producer(QString::fromLatin1("Qt " QT_VERSION_STR));
-
- const QDateTime now = QDateTime::currentDateTime();
- const QDate date = now.date();
- const QTime time = now.time();
- const QString timeStr =
- QString::asprintf("%d-%02d-%02dT%02d:%02d:%02d",
- date.year(), date.month(), date.day(),
- time.hour(), time.minute(), time.second());
+ const QString metaDataDate = timeStr + tzStr;
- const int offset = now.offsetFromUtc();
- const int hours = (offset / 60) / 60;
- const int mins = (offset / 60) % 60;
- QString tzStr;
- if (offset < 0)
- tzStr = QString::asprintf("-%02d:%02d", -hours, -mins);
- else if (offset > 0)
- tzStr = QString::asprintf("+%02d:%02d", hours , mins);
+ QFile metaDataFile(QLatin1String(":/qpdf/qpdfa_metadata.xml"));
+ metaDataFile.open(QIODevice::ReadOnly);
+ metaDataContent = QString::fromUtf8(metaDataFile.readAll()).arg(producer.toHtmlEscaped(),
+ title.toHtmlEscaped(),
+ creator.toHtmlEscaped(),
+ metaDataDate).toUtf8();
+ }
else
- tzStr = QLatin1String("Z");
+ metaDataContent = xmpDocumentMetadata;
- const QString metaDataDate = timeStr + tzStr;
-
- QFile metaDataFile(QLatin1String(":/qpdf/qpdfa_metadata.xml"));
- metaDataFile.open(QIODevice::ReadOnly);
- const QByteArray metaDataContent = QString::fromUtf8(metaDataFile.readAll()).arg(producer.toHtmlEscaped(),
- title.toHtmlEscaped(),
- creator.toHtmlEscaped(),
- metaDataDate).toUtf8();
xprintf("<<\n"
"/Type /Metadata /Subtype /XML\n"
"/Length %d\n"
@@ -1774,6 +1819,56 @@ void QPdfEnginePrivate::writePageRoot()
"endobj\n");
}
+void QPdfEnginePrivate::writeAttachmentRoot()
+{
+ if (fileCache.isEmpty())
+ return;
+
+ QVector<int> attachments;
+ const int size = fileCache.size();
+ for (int i = 0; i < size; ++i) {
+ auto attachment = fileCache.at(i);
+ const int attachmentID = addXrefEntry(-1);
+ xprintf("<<\n");
+ if (do_compress)
+ xprintf("/Filter /FlateDecode\n");
+
+ const int lenobj = requestObject();
+ xprintf("/Length %d 0 R\n", lenobj);
+ int len = 0;
+ xprintf(">>\nstream\n");
+ len = writeCompressed(attachment.data);
+ xprintf("\nendstream\n"
+ "endobj\n");
+ addXrefEntry(lenobj);
+ xprintf("%d\n"
+ "endobj\n", len);
+
+ attachments.push_back(addXrefEntry(-1));
+ xprintf("<<\n"
+ "/F (%s)", attachment.fileName.toLatin1().constData());
+
+ xprintf("\n/EF <</F %d 0 R>>\n"
+ "/Type/Filespec\n"
+ , attachmentID);
+ if (!attachment.mimeType.isEmpty())
+ xprintf("/Subtype/%s\n",
+ attachment.mimeType.replace(QLatin1String("/"),
+ QLatin1String("#2F")).toLatin1().constData());
+ xprintf(">>\nendobj\n");
+ }
+
+ // names
+ addXrefEntry(namesRoot);
+ xprintf("<</Names[");
+ for (int i = 0; i < size; ++i) {
+ auto attachment = fileCache.at(i);
+ printString(attachment.fileName);
+ xprintf("%d 0 R\n", attachments.at(i));
+ }
+ xprintf("]>>\n"
+ "endobj\n");
+}
void QPdfEnginePrivate::embedFont(QFontSubset *font)
{
@@ -2031,6 +2126,8 @@ void QPdfEnginePrivate::writeTail()
writePage();
writeFonts();
writePageRoot();
+ writeAttachmentRoot();
+
addXrefEntry(xrefPositions.size(),false);
xprintf("xref\n"
"0 %d\n"
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index 89e549614a..57d70db442 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -187,6 +187,11 @@ public:
void setPdfVersion(PdfVersion version);
+ void setDocumentXmpMetadata(const QByteArray &xmpMetadata);
+ QByteArray documentXmpMetadata() const;
+
+ void addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType);
+
// reimplementations QPaintEngine
bool begin(QPaintDevice *pdev) override;
bool end() override;
@@ -297,9 +302,10 @@ private:
int createShadingFunction(const QGradient *gradient, int from, int to, bool reflect, bool alpha);
void writeInfo();
- int writeXmpMetaData();
+ int writeXmpDcumentMetaData();
int writeOutputIntent();
void writePageRoot();
+ void writeAttachmentRoot();
void writeFonts();
void embedFont(QFontSubset *font);
qreal calcUserUnit() const;
@@ -324,11 +330,22 @@ private:
inline int writeCompressed(const QByteArray &data) { return writeCompressed(data.constData(), data.length()); }
int writeCompressed(QIODevice *dev);
+ struct AttachmentInfo
+ {
+ AttachmentInfo (const QString &fileName, const QByteArray &data, const QString &mimeType)
+ : fileName(fileName), data(data), mimeType(mimeType) {}
+ QString fileName;
+ QByteArray data;
+ QString mimeType;
+ };
+
// various PDF objects
- int pageRoot, catalog, info, graphicsState, patternColorSpace;
+ int pageRoot, embeddedfilesRoot, namesRoot, catalog, info, graphicsState, patternColorSpace;
QVector<uint> pages;
QHash<qint64, uint> imageCache;
QHash<QPair<uint, uint>, uint > alphaCache;
+ QVector<AttachmentInfo> fileCache;
+ QByteArray xmpDocumentMetadata;
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp
index bf7e2d3dca..4f70fe6ad2 100644
--- a/src/gui/painting/qpdfwriter.cpp
+++ b/src/gui/painting/qpdfwriter.cpp
@@ -55,7 +55,7 @@ public:
: QObjectPrivate()
{
engine = new QPdfEngine();
- output = 0;
+ output = nullptr;
pdfVersion = QPdfWriter::PdfVersion_1_4;
}
~QPdfWriterPrivate()
@@ -266,6 +266,50 @@ int QPdfWriter::resolution() const
return d->engine->resolution();
}
+/*!
+ \since 5.15
+
+ Sets the document metadata. This metadata is not influenced by the setTitle / setCreator methods,
+ so is up to the user to keep it consistent.
+ \a xmpMetadata contains XML formatted metadata to embed into the PDF file.
+
+ \sa documentXmpMetadata()
+*/
+
+void QPdfWriter::setDocumentXmpMetadata(const QByteArray &xmpMetadata)
+{
+ Q_D(const QPdfWriter);
+ d->engine->setDocumentXmpMetadata(xmpMetadata);
+}
+
+/*!
+ \since 5.15
+
+ Gets the document metadata, as it was provided with a call to setDocumentXmpMetadata. It will not
+ return the default metadata.
+
+ \sa setDocumentXmpMetadata()
+*/
+
+QByteArray QPdfWriter::documentXmpMetadata() const
+{
+ Q_D(const QPdfWriter);
+ return d->engine->documentXmpMetadata();
+}
+
+/*!
+ \since 5.15
+
+ Adds \a fileName attachment to the PDF with (optional) \a mimeType
+ \a data contains the raw file data to embed into the PDF file.
+*/
+
+void QPdfWriter::addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType)
+{
+ Q_D(QPdfWriter);
+ d->engine->addFileAttachment(fileName, data, mimeType);
+}
+
// Defined in QPagedPaintDevice but non-virtual, add QPdfWriter specific doc here
#ifdef Q_QDOC
/*!
diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h
index 668081e008..04039a0104 100644
--- a/src/gui/painting/qpdfwriter.h
+++ b/src/gui/painting/qpdfwriter.h
@@ -75,6 +75,11 @@ public:
void setResolution(int resolution);
int resolution() const;
+ void setDocumentXmpMetadata(const QByteArray &xmpMetadata);
+ QByteArray documentXmpMetadata() const;
+
+ void addFileAttachment(const QString &fileName, const QByteArray &data, const QString &mimeType = QString());
+
#ifdef Q_QDOC
bool setPageLayout(const QPageLayout &pageLayout);
bool setPageSize(const QPageSize &pageSize);
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index dc6e3e04d0..1a940443d1 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -254,7 +254,7 @@ public:
{
if (!pen->ref.deref())
delete pen;
- pen = 0;
+ pen = nullptr;
}
};
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 45e90bd99b..c092a7153f 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -87,10 +87,10 @@ class QPlatformBackingStorePrivate
public:
QPlatformBackingStorePrivate(QWindow *w)
: window(w)
- , backingStore(0)
+ , backingStore(nullptr)
#ifndef QT_NO_OPENGL
, textureId(0)
- , blitter(0)
+ , blitter(nullptr)
#endif
{
}
@@ -427,7 +427,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
origin = QOpenGLTextureBlitter::OriginBottomLeft;
textureId = d_ptr->textureId;
} else {
- TextureFlags flags = 0;
+ TextureFlags flags;
textureId = toTexture(deviceRegion(region, window, offset), &d_ptr->textureSize, &flags);
d_ptr->needsSwizzle = (flags & TextureSwizzle) != 0;
d_ptr->premultiplied = (flags & TexturePremultiplied) != 0;
@@ -534,7 +534,7 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion, QSize *textu
GLuint pixelType = GL_UNSIGNED_BYTE;
bool needsConversion = false;
- *flags = 0;
+ *flags = { };
switch (image.format()) {
case QImage::Format_ARGB32_Premultiplied:
*flags |= TexturePremultiplied;
diff --git a/src/gui/painting/qplatformbackingstore.h b/src/gui/painting/qplatformbackingstore.h
index 4f08b0092f..7aa054f1e2 100644
--- a/src/gui/painting/qplatformbackingstore.h
+++ b/src/gui/painting/qplatformbackingstore.h
@@ -100,7 +100,7 @@ public:
bool isLocked() const;
void appendTexture(void *source, GLuint textureId, const QRect &geometry,
- const QRect &clipRect = QRect(), Flags flags = nullptr);
+ const QRect &clipRect = QRect(), Flags flags = { });
void clear();
Q_SIGNALS:
diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp
index b4014272f4..cd31d75f83 100644
--- a/src/gui/painting/qrasterizer.cpp
+++ b/src/gui/painting/qrasterizer.cpp
@@ -209,7 +209,7 @@ QScanConverter::QScanConverter()
: m_lines(0)
, m_alloc(0)
, m_size(0)
- , m_intersections(0)
+ , m_intersections(nullptr)
, m_active(0)
{
}
@@ -442,7 +442,7 @@ void QScanConverter::end()
free(m_intersections);
m_alloc = 0;
m_size = 0;
- m_intersections = 0;
+ m_intersections = nullptr;
}
if (m_lines.size() > 1024)
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 82f5be2b65..783b02fb93 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -1128,7 +1128,7 @@ Q_GUI_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
segments.resize(4 * (end - rect));
int lastRowSegmentCount = 0;
- Segment *lastRowSegments = 0;
+ Segment *lastRowSegments = nullptr;
int lastSegment = 0;
int lastY = 0;
@@ -1380,10 +1380,10 @@ void QRegionPrivate::intersect(const QRect &rect)
extents.setRight(qMax(extents.right(), dest->right()));
extents.setBottom(qMax(extents.bottom(), dest->bottom()));
- const QRect *nextToLast = (numRects > 1 ? dest - 2 : 0);
+ const QRect *nextToLast = (numRects > 1 ? dest - 2 : nullptr);
// mergeFromBelow inlined and optimized
- if (canMergeFromBelow(dest - 1, dest, nextToLast, 0)) {
+ if (canMergeFromBelow(dest - 1, dest, nextToLast, nullptr)) {
if (!n || src->y() != dest->y() || src->left() > r.right()) {
QRect *prev = dest - 1;
prev->setBottom(dest->bottom());
@@ -1408,11 +1408,11 @@ void QRegionPrivate::append(const QRect *r)
QRect *myLast = (numRects == 1 ? &extents : rects.data() + (numRects - 1));
if (mergeFromRight(myLast, r)) {
if (numRects > 1) {
- const QRect *nextToTop = (numRects > 2 ? myLast - 2 : 0);
- if (mergeFromBelow(myLast - 1, myLast, nextToTop, 0))
+ const QRect *nextToTop = (numRects > 2 ? myLast - 2 : nullptr);
+ if (mergeFromBelow(myLast - 1, myLast, nextToTop, nullptr))
--numRects;
}
- } else if (mergeFromBelow(myLast, r, (numRects > 1 ? myLast - 1 : 0), 0)) {
+ } else if (mergeFromBelow(myLast, r, (numRects > 1 ? myLast - 1 : nullptr), nullptr)) {
// nothing
} else {
vectorize();
@@ -1451,18 +1451,18 @@ void QRegionPrivate::append(const QRegionPrivate *r)
{
const QRect *rFirst = srcRect;
QRect *myLast = destRect - 1;
- const QRect *nextToLast = (numRects > 1 ? myLast - 1 : 0);
+ const QRect *nextToLast = (numRects > 1 ? myLast - 1 : nullptr);
if (mergeFromRight(myLast, rFirst)) {
++srcRect;
--numAppend;
- const QRect *rNextToFirst = (numAppend > 1 ? rFirst + 2 : 0);
+ const QRect *rNextToFirst = (numAppend > 1 ? rFirst + 2 : nullptr);
if (mergeFromBelow(myLast, rFirst + 1, nextToLast, rNextToFirst)) {
++srcRect;
--numAppend;
}
if (numRects > 1) {
- nextToLast = (numRects > 2 ? myLast - 2 : 0);
- rNextToFirst = (numAppend > 0 ? srcRect : 0);
+ nextToLast = (numRects > 2 ? myLast - 2 : nullptr);
+ rNextToFirst = (numAppend > 0 ? srcRect : nullptr);
if (mergeFromBelow(myLast - 1, myLast, nextToLast, rNextToFirst)) {
--destRect;
--numRects;
@@ -1522,20 +1522,20 @@ void QRegionPrivate::prepend(const QRegionPrivate *r)
// try merging
{
QRect *myFirst = rects.data();
- const QRect *nextToFirst = (numRects > 1 ? myFirst + 1 : 0);
+ const QRect *nextToFirst = (numRects > 1 ? myFirst + 1 : nullptr);
const QRect *rLast = r->rects.constData() + r->numRects - 1;
- const QRect *rNextToLast = (r->numRects > 1 ? rLast - 1 : 0);
+ const QRect *rNextToLast = (r->numRects > 1 ? rLast - 1 : nullptr);
if (mergeFromLeft(myFirst, rLast)) {
--numPrepend;
--rLast;
- rNextToLast = (numPrepend > 1 ? rLast - 1 : 0);
+ rNextToLast = (numPrepend > 1 ? rLast - 1 : nullptr);
if (mergeFromAbove(myFirst, rLast, nextToFirst, rNextToLast)) {
--numPrepend;
--rLast;
}
if (numRects > 1) {
- nextToFirst = (numRects > 2? myFirst + 2 : 0);
- rNextToLast = (numPrepend > 0 ? rLast : 0);
+ nextToFirst = (numRects > 2? myFirst + 2 : nullptr);
+ rNextToLast = (numPrepend > 0 ? rLast : nullptr);
if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, rNextToLast)) {
--numRects;
++numSkip;
@@ -1585,14 +1585,14 @@ void QRegionPrivate::prepend(const QRect *r)
QRect *myFirst = (numRects == 1 ? &extents : rects.data());
if (mergeFromLeft(myFirst, r)) {
if (numRects > 1) {
- const QRect *nextToFirst = (numRects > 2 ? myFirst + 2 : 0);
- if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, 0)) {
+ const QRect *nextToFirst = (numRects > 2 ? myFirst + 2 : nullptr);
+ if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, nullptr)) {
--numRects;
memmove(rects.data(), rects.constData() + 1,
numRects * sizeof(QRect));
}
}
- } else if (mergeFromAbove(myFirst, r, (numRects > 1 ? myFirst + 1 : 0), 0)) {
+ } else if (mergeFromAbove(myFirst, r, (numRects > 1 ? myFirst + 1 : nullptr), nullptr)) {
// nothing
} else {
vectorize();
@@ -2324,14 +2324,14 @@ static void miRegionOp(QRegionPrivate &dest,
top = qMax(r1->top(), ybot + 1);
bot = qMin(r1->bottom(), r2->top() - 1);
- if (nonOverlap1Func != 0 && bot >= top)
+ if (nonOverlap1Func != nullptr && bot >= top)
(*nonOverlap1Func)(dest, r1, r1BandEnd, top, bot);
ytop = r2->top();
} else if (r2->top() < r1->top()) {
top = qMax(r2->top(), ybot + 1);
bot = qMin(r2->bottom(), r1->top() - 1);
- if (nonOverlap2Func != 0 && bot >= top)
+ if (nonOverlap2Func != nullptr && bot >= top)
(*nonOverlap2Func)(dest, r2, r2BandEnd, top, bot);
ytop = r1->top();
} else {
@@ -2374,7 +2374,7 @@ static void miRegionOp(QRegionPrivate &dest,
*/
curBand = dest.numRects;
if (r1 != r1End) {
- if (nonOverlap1Func != 0) {
+ if (nonOverlap1Func != nullptr) {
do {
r1BandEnd = r1;
while (r1BandEnd < r1End && r1BandEnd->top() == r1->top())
@@ -2383,7 +2383,7 @@ static void miRegionOp(QRegionPrivate &dest,
r1 = r1BandEnd;
} while (r1 != r1End);
}
- } else if ((r2 != r2End) && (nonOverlap2Func != 0)) {
+ } else if ((r2 != r2End) && (nonOverlap2Func != nullptr)) {
do {
r2BandEnd = r2;
while (r2BandEnd < r2End && r2BandEnd->top() == r2->top())
@@ -2698,7 +2698,7 @@ static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS,
Q_ASSERT(!regS->contains(*regM));
Q_ASSERT(!EqualRegion(regM, regS));
- miRegionOp(dest, regM, regS, miSubtractO, miSubtractNonO1, 0);
+ miRegionOp(dest, regM, regS, miSubtractO, miSubtractNonO1, nullptr);
/*
* Can't alter dest's extents before we call miRegionOp because
@@ -3235,14 +3235,14 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
(ScanLineListBlock *)malloc(sizeof(ScanLineListBlock));
Q_CHECK_PTR(tmpSLLBlock);
(*SLLBlock)->next = tmpSLLBlock;
- tmpSLLBlock->next = (ScanLineListBlock *)NULL;
+ tmpSLLBlock->next = (ScanLineListBlock *)nullptr;
*SLLBlock = tmpSLLBlock;
*iSLLBlock = 0;
}
pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
pSLL->next = pPrevSLL->next;
- pSLL->edgelist = (EdgeTableEntry *)NULL;
+ pSLL->edgelist = (EdgeTableEntry *)nullptr;
pPrevSLL->next = pSLL;
}
pSLL->scanline = scanline;
@@ -3250,7 +3250,7 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
/*
* now insert the edge in the right bucket
*/
- prev = 0;
+ prev = nullptr;
start = pSLL->edgelist;
while (start && (start->bres.minor_axis < ETE->bres.minor_axis)) {
prev = start;
@@ -3306,18 +3306,18 @@ static void CreateETandAET(int count, const QPoint *pts,
/*
* initialize the Active Edge Table
*/
- AET->next = 0;
- AET->back = 0;
- AET->nextWETE = 0;
+ AET->next = nullptr;
+ AET->back = nullptr;
+ AET->nextWETE = nullptr;
AET->bres.minor_axis = SMALL_COORDINATE;
/*
* initialize the Edge Table.
*/
- ET->scanlines.next = 0;
+ ET->scanlines.next = nullptr;
ET->ymax = SMALL_COORDINATE;
ET->ymin = LARGE_COORDINATE;
- pSLLBlock->next = 0;
+ pSLLBlock->next = nullptr;
PrevPt = &pts[count - 1];
@@ -3426,7 +3426,7 @@ static void computeWAET(EdgeTableEntry *AET)
int inside = 1;
int isInside = 0;
- AET->nextWETE = 0;
+ AET->nextWETE = nullptr;
pWETE = AET;
AET = AET->next;
while (AET) {
@@ -3442,7 +3442,7 @@ static void computeWAET(EdgeTableEntry *AET)
}
AET = AET->next;
}
- pWETE->nextWETE = 0;
+ pWETE->nextWETE = nullptr;
}
/*
@@ -3672,7 +3672,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
if (!(pETEs = static_cast<EdgeTableEntry *>(malloc(sizeof(EdgeTableEntry) * Count)))) {
delete region;
- return 0;
+ return nullptr;
}
region->vectorize();
@@ -3692,7 +3692,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
#endif
delete AET;
delete region;
- return 0;
+ return nullptr;
}
@@ -3808,7 +3808,7 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
curPtBlock = tmpPtBlock;
}
free(pETEs);
- return 0; // this function returns 0 in case of an error
+ return nullptr; // this function returns 0 in case of an error
}
FreeStorage(SLLBlock.next);
@@ -4185,7 +4185,7 @@ QRegion QRegion::intersected(const QRegion &r) const
QRegion result;
result.detach();
- miRegionOp(*result.d->qt_rgn, d->qt_rgn, r.d->qt_rgn, miIntersectO, 0, 0);
+ miRegionOp(*result.d->qt_rgn, d->qt_rgn, r.d->qt_rgn, miIntersectO, nullptr, nullptr);
/*
* Can't alter dest's extents before we call miRegionOp because
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index 271d3ba6bf..22302f9790 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -185,10 +185,10 @@ QStrokerOps::QStrokerOps()
: m_elements(0)
, m_curveThreshold(qt_real_to_fixed(0.25))
, m_dashThreshold(qt_real_to_fixed(0.25))
- , m_customData(0)
- , m_moveTo(0)
- , m_lineTo(0)
- , m_cubicTo(0)
+ , m_customData(nullptr)
+ , m_moveTo(nullptr)
+ , m_lineTo(nullptr)
+ , m_cubicTo(nullptr)
{
}
@@ -219,7 +219,7 @@ void QStrokerOps::end()
{
if (m_elements.size() > 1)
processCurrentSubpath();
- m_customData = 0;
+ m_customData = nullptr;
}
/*!
diff --git a/src/gui/painting/qt_attribution.json b/src/gui/painting/qt_attribution.json
index 7b16e8c211..e2326a56c1 100644
--- a/src/gui/painting/qt_attribution.json
+++ b/src/gui/painting/qt_attribution.json
@@ -29,20 +29,6 @@
(C) Willem Monsuwe <willem@stack.nl>"
},
{
- "Id": "webgradients",
- "Name": "WebGradients",
- "QDocModule": "qtgui",
- "QtUsage": "Used in Qt GUI to provide presets for QGradient.",
- "Files": "webgradients.css",
-
- "Description": "WebGradients is a free collection of 180 linear gradients.",
- "Homepage": "https://webgradients.com/",
- "License": "MIT License",
- "LicenseId": "MIT",
- "LicenseFile": "WEBGRADIENTS_LICENSE.txt",
- "Copyright": "Copyright (c) 2017 itmeo"
- },
- {
"Id": "xserverhelper",
"Name": "X Server helper",
"QDocModule": "qtgui",
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 7a3dd04965..91214f27ca 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -127,7 +127,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
QFixed subPixelPosition;
if (supportsSubPixelPositions) {
- QFixed x = positions != 0 ? positions[i].x : QFixed();
+ QFixed x = positions != nullptr ? positions[i].x : QFixed();
subPixelPosition = fontEngine->subPixelPositionForX(x);
}
@@ -341,9 +341,10 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP
} else if (m_format == QFontEngine::Format_Mono) {
if (mask.depth() > 1) {
// TODO optimize this
- mask = mask.alphaChannel();
+ mask.convertTo(QImage::Format_Alpha8);
+ mask.reinterpretAsFormat(QImage::Format_Grayscale8);
mask.invertPixels();
- mask = mask.convertToFormat(QImage::Format_Mono, Qt::ThresholdDither);
+ mask.convertTo(QImage::Format_Mono, Qt::ThresholdDither);
}
int mw = qMin(mask.width(), c.w);
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index b220770144..b2a634dd2a 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -303,6 +303,7 @@ inline qreal QTransform::dy() const
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
+QT_WARNING_DISABLE_INTEL(1572)
inline QTransform &QTransform::operator*=(qreal num)
{
diff --git a/src/gui/painting/qtriangulatingstroker.cpp b/src/gui/painting/qtriangulatingstroker.cpp
index b1b07f9699..8e0308f268 100644
--- a/src/gui/painting/qtriangulatingstroker.cpp
+++ b/src/gui/painting/qtriangulatingstroker.cpp
@@ -150,7 +150,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co
m_cos_theta = qFastCos(Q_PI / m_roundness);
const qreal *endPts = pts + (count<<1);
- const qreal *startPts = 0;
+ const qreal *startPts = nullptr;
Qt::PenCapStyle cap = m_cap_style;
@@ -510,7 +510,7 @@ static void qdashprocessor_cubicTo(qreal, qreal, qreal, qreal, qreal, qreal, voi
QDashedStrokeProcessor::QDashedStrokeProcessor()
: m_points(0), m_types(0),
- m_dash_stroker(0), m_inv_scale(1)
+ m_dash_stroker(nullptr), m_inv_scale(1)
{
m_dash_stroker.setMoveToHook(qdashprocessor_moveTo);
m_dash_stroker.setLineToHook(qdashprocessor_lineTo);
diff --git a/src/gui/painting/qtriangulator.cpp b/src/gui/painting/qtriangulator.cpp
index 9be3eeaffd..ec3ab8ff8f 100644
--- a/src/gui/painting/qtriangulator.cpp
+++ b/src/gui/painting/qtriangulator.cpp
@@ -958,7 +958,7 @@ void QTriangulator<T>::ComplexToSimple::initEdges()
} else {
Q_ASSERT(i + 1 < m_parent->m_indices.size());
// {node, from, to, next, previous, winding, mayIntersect, pointingUp, originallyPointingUp}
- Edge edge = {0, int(m_parent->m_indices.at(i)), int(m_parent->m_indices.at(i + 1)), -1, -1, 0, true, false, false};
+ Edge edge = {nullptr, int(m_parent->m_indices.at(i)), int(m_parent->m_indices.at(i + 1)), -1, -1, 0, true, false, false};
m_edges.add(edge);
}
}
@@ -1029,7 +1029,7 @@ template <typename T>
QRBTree<int>::Node *QTriangulator<T>::ComplexToSimple::searchEdgeLeftOf(int edgeIndex) const
{
QRBTree<int>::Node *current = m_edgeList.root;
- QRBTree<int>::Node *result = 0;
+ QRBTree<int>::Node *result = nullptr;
while (current) {
if (edgeIsLeftOfEdge(edgeIndex, current->data)) {
current = current->left;
@@ -1072,7 +1072,7 @@ QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> QTriangulator<T>::ComplexToSim
}
current = (d < 0 ? current->left : current->right);
}
- if (current == 0)
+ if (current == nullptr)
return result;
current = result.first->left;
@@ -1273,7 +1273,7 @@ void QTriangulator<T>::ComplexToSimple::fillPriorityQueue()
m_events.reserve(m_edges.size() * 2);
for (int i = 0; i < m_edges.size(); ++i) {
Q_ASSERT(m_edges.at(i).previous == -1 && m_edges.at(i).next == -1);
- Q_ASSERT(m_edges.at(i).node == 0);
+ Q_ASSERT(m_edges.at(i).node == nullptr);
Q_ASSERT(m_edges.at(i).pointingUp == m_edges.at(i).originallyPointingUp);
Q_ASSERT(m_edges.at(i).pointingUp == (m_parent->m_vertices.at(m_edges.at(i).to) < m_parent->m_vertices.at(m_edges.at(i).from)));
// Ignore zero-length edges.
@@ -1296,7 +1296,7 @@ void QTriangulator<T>::ComplexToSimple::calculateIntersections()
fillPriorityQueue();
Q_ASSERT(m_topIntersection.empty());
- Q_ASSERT(m_edgeList.root == 0);
+ Q_ASSERT(m_edgeList.root == nullptr);
// Find all intersection points.
while (!m_events.isEmpty()) {
@@ -1305,7 +1305,7 @@ void QTriangulator<T>::ComplexToSimple::calculateIntersections()
// Find all edges in the edge list that contain the current vertex and mark them to be split later.
QPair<QRBTree<int>::Node *, QRBTree<int>::Node *> range = bounds(event.point);
- QRBTree<int>::Node *leftNode = range.first ? m_edgeList.previous(range.first) : 0;
+ QRBTree<int>::Node *leftNode = range.first ? m_edgeList.previous(range.first) : nullptr;
int vertex = (event.type == Event::Upper ? m_edges.at(event.edge).upper() : m_edges.at(event.edge).lower());
QIntersectionPoint eventPoint = QT_PREPEND_NAMESPACE(qIntersectionPoint)(event.point);
@@ -1361,7 +1361,7 @@ int QTriangulator<T>::ComplexToSimple::splitEdge(int splitIndex)
{
const Split &split = m_splits.at(splitIndex);
Edge &lowerEdge = m_edges.at(split.edge);
- Q_ASSERT(lowerEdge.node == 0);
+ Q_ASSERT(lowerEdge.node == nullptr);
Q_ASSERT(lowerEdge.previous == -1 && lowerEdge.next == -1);
if (lowerEdge.from == split.vertex)
@@ -1439,7 +1439,7 @@ void QTriangulator<T>::ComplexToSimple::insertEdgeIntoVectorIfWanted(ShortArray
template <typename T>
void QTriangulator<T>::ComplexToSimple::removeUnwantedEdgesAndConnect()
{
- Q_ASSERT(m_edgeList.root == 0);
+ Q_ASSERT(m_edgeList.root == nullptr);
// Initialize priority queue.
fillPriorityQueue();
@@ -1772,7 +1772,7 @@ void QTriangulator<T>::SimpleToMonotone::setupDataStructures()
{
int i = 0;
Edge e;
- e.node = 0;
+ e.node = nullptr;
e.twin = -1;
while (i + 3 <= m_parent->m_indices.size()) {
@@ -1862,7 +1862,7 @@ template <typename T>
QRBTree<int>::Node *QTriangulator<T>::SimpleToMonotone::searchEdgeLeftOfEdge(int edgeIndex) const
{
QRBTree<int>::Node *current = m_edgeList.root;
- QRBTree<int>::Node *result = 0;
+ QRBTree<int>::Node *result = nullptr;
while (current) {
if (edgeIsLeftOfEdge(edgeIndex, current->data)) {
current = current->left;
@@ -1879,7 +1879,7 @@ template <typename T>
QRBTree<int>::Node *QTriangulator<T>::SimpleToMonotone::searchEdgeLeftOfPoint(int pointIndex) const
{
QRBTree<int>::Node *current = m_edgeList.root;
- QRBTree<int>::Node *result = 0;
+ QRBTree<int>::Node *result = nullptr;
while (current) {
const QPodPoint &p1 = m_parent->m_vertices.at(m_edges.at(current->data).lower());
const QPodPoint &p2 = m_parent->m_vertices.at(m_edges.at(current->data).upper());
@@ -2038,7 +2038,7 @@ void QTriangulator<T>::SimpleToMonotone::monotoneDecomposition()
j = m_edges.at(i).previous;
Q_ASSERT(j < m_edges.size());
- QRBTree<int>::Node *leftEdgeNode = 0;
+ QRBTree<int>::Node *leftEdgeNode = nullptr;
switch (m_edges.at(i).type) {
case RegularVertex:
@@ -2049,7 +2049,7 @@ void QTriangulator<T>::SimpleToMonotone::monotoneDecomposition()
if (m_edges.at(m_edges.at(i).helper).type == MergeVertex)
diagonals.add(QPair<int, int>(i, m_edges.at(i).helper));
m_edges.at(j).node = m_edges.at(i).node;
- m_edges.at(i).node = 0;
+ m_edges.at(i).node = nullptr;
m_edges.at(j).node->data = j;
m_edges.at(j).helper = i;
} else if (m_edges.at(j).node) {
@@ -2057,7 +2057,7 @@ void QTriangulator<T>::SimpleToMonotone::monotoneDecomposition()
if (m_edges.at(m_edges.at(j).helper).type == MergeVertex)
diagonals.add(QPair<int, int>(i, m_edges.at(j).helper));
m_edges.at(i).node = m_edges.at(j).node;
- m_edges.at(j).node = 0;
+ m_edges.at(j).node = nullptr;
m_edges.at(i).node->data = i;
m_edges.at(i).helper = i;
} else {
diff --git a/src/gui/painting/webgradients.binaryjson b/src/gui/painting/webgradients.binaryjson
deleted file mode 100644
index 75edd487be..0000000000
--- a/src/gui/painting/webgradients.binaryjson
+++ /dev/null
Binary files differ
diff --git a/src/gui/painting/webgradients.cpp b/src/gui/painting/webgradients.cpp
new file mode 100644
index 0000000000..b4d297450b
--- /dev/null
+++ b/src/gui/painting/webgradients.cpp
@@ -0,0 +1,578 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// This file is auto-generated by gradientgen. DO NOT EDIT!
+
+static QArrayDataPointerRef<QGradientStop> qt_preset_gradient_stops(QGradient::Preset preset)
+{
+ Q_ASSERT(preset < QGradient::NumPresets);
+ switch (preset) {
+ case QGradient::WarmFlame:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 154, 158, 255)), QGradientStop(0.99, QColor(250, 208, 196, 255)), QGradientStop(1, QColor(250, 208, 196, 255)));
+ case QGradient::NightFade:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(161, 140, 209, 255)), QGradientStop(1, QColor(251, 194, 235, 255)));
+ case QGradient::SpringWarmth:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(250, 208, 196, 255)), QGradientStop(0.01, QColor(250, 208, 196, 255)), QGradientStop(1, QColor(255, 209, 255, 255)));
+ case QGradient::JuicyPeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 236, 210, 255)), QGradientStop(1, QColor(252, 182, 159, 255)));
+ case QGradient::YoungPassion:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 129, 119, 255)), QGradientStop(0, QColor(255, 134, 122, 255)), QGradientStop(0.21, QColor(255, 140, 127, 255)), QGradientStop(0.52, QColor(249, 145, 133, 255)), QGradientStop(0.78, QColor(207, 85, 108, 255)), QGradientStop(1, QColor(177, 42, 91, 255)));
+ case QGradient::LadyLips:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 154, 158, 255)), QGradientStop(0.99, QColor(254, 207, 239, 255)), QGradientStop(1, QColor(254, 207, 239, 255)));
+ case QGradient::SunnyMorning:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(246, 211, 101, 255)), QGradientStop(1, QColor(253, 160, 133, 255)));
+ case QGradient::RainyAshville:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(251, 194, 235, 255)), QGradientStop(1, QColor(166, 193, 238, 255)));
+ case QGradient::FrozenDreams:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 203, 241, 255)), QGradientStop(0.01, QColor(253, 203, 241, 255)), QGradientStop(1, QColor(230, 222, 233, 255)));
+ case QGradient::WinterNeva:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(161, 196, 253, 255)), QGradientStop(1, QColor(194, 233, 251, 255)));
+ case QGradient::DustyGrass:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(212, 252, 121, 255)), QGradientStop(1, QColor(150, 230, 161, 255)));
+ case QGradient::TemptingAzure:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(132, 250, 176, 255)), QGradientStop(1, QColor(143, 211, 244, 255)));
+ case QGradient::HeavyRain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(207, 217, 223, 255)), QGradientStop(1, QColor(226, 235, 240, 255)));
+ case QGradient::AmyCrisp:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(166, 192, 254, 255)), QGradientStop(1, QColor(246, 128, 132, 255)));
+ case QGradient::MeanFruit:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(252, 203, 144, 255)), QGradientStop(1, QColor(213, 126, 235, 255)));
+ case QGradient::DeepBlue:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(224, 195, 252, 255)), QGradientStop(1, QColor(142, 197, 252, 255)));
+ case QGradient::RipeMalinka:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(240, 147, 251, 255)), QGradientStop(1, QColor(245, 87, 108, 255)));
+ case QGradient::CloudyKnoxville:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 251, 251, 255)), QGradientStop(1, QColor(235, 237, 238, 255)));
+ case QGradient::MalibuBeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(79, 172, 254, 255)), QGradientStop(1, QColor(0, 242, 254, 255)));
+ case QGradient::NewLife:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(67, 233, 123, 255)), QGradientStop(1, QColor(56, 249, 215, 255)));
+ case QGradient::TrueSunset:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(250, 112, 154, 255)), QGradientStop(1, QColor(254, 225, 64, 255)));
+ case QGradient::MorpheusDen:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(48, 207, 208, 255)), QGradientStop(1, QColor(51, 8, 103, 255)));
+ case QGradient::RareWind:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(168, 237, 234, 255)), QGradientStop(1, QColor(254, 214, 227, 255)));
+ case QGradient::NearMoon:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(94, 231, 223, 255)), QGradientStop(1, QColor(180, 144, 202, 255)));
+ case QGradient::WildApple:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(210, 153, 194, 255)), QGradientStop(1, QColor(254, 249, 215, 255)));
+ case QGradient::SaintPetersburg:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(245, 247, 250, 255)), QGradientStop(1, QColor(195, 207, 226, 255)));
+ case QGradient::PlumPlate:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(102, 126, 234, 255)), QGradientStop(1, QColor(118, 75, 162, 255)));
+ case QGradient::EverlastingSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 252, 251, 255)), QGradientStop(1, QColor(226, 209, 195, 255)));
+ case QGradient::HappyFisher:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(137, 247, 254, 255)), QGradientStop(1, QColor(102, 166, 255, 255)));
+ case QGradient::Blessing:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(253, 219, 146, 255)), QGradientStop(1, QColor(209, 253, 255, 255)));
+ case QGradient::SharpeyeEagle:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(152, 144, 227, 255)), QGradientStop(1, QColor(177, 244, 207, 255)));
+ case QGradient::LadogaBottom:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(235, 192, 253, 255)), QGradientStop(1, QColor(217, 222, 216, 255)));
+ case QGradient::LemonGate:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(150, 251, 196, 255)), QGradientStop(1, QColor(249, 245, 134, 255)));
+ case QGradient::ItmeoBranding:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(42, 245, 152, 255)), QGradientStop(1, QColor(0, 158, 253, 255)));
+ case QGradient::ZeusMiracle:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(205, 156, 242, 255)), QGradientStop(1, QColor(246, 243, 255, 255)));
+ case QGradient::OldHat:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(228, 175, 203, 255)), QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0.3, QColor(226, 197, 139, 255)), QGradientStop(0.64, QColor(194, 206, 156, 255)), QGradientStop(1, QColor(126, 219, 220, 255)));
+ case QGradient::StarWine:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0, QColor(184, 203, 184, 255)), QGradientStop(0, QColor(180, 101, 218, 255)), QGradientStop(0.33, QColor(207, 108, 201, 255)), QGradientStop(0.66, QColor(238, 96, 156, 255)), QGradientStop(1, QColor(238, 96, 156, 255)));
+ case QGradient::HappyAcid:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(55, 236, 186, 255)), QGradientStop(1, QColor(114, 175, 211, 255)));
+ case QGradient::AwesomePine:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(235, 187, 167, 255)), QGradientStop(1, QColor(207, 199, 248, 255)));
+ case QGradient::NewYork:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 241, 235, 255)), QGradientStop(1, QColor(172, 224, 249, 255)));
+ case QGradient::ShyRainbow:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(238, 162, 162, 255)), QGradientStop(0.19, QColor(187, 193, 191, 255)), QGradientStop(0.42, QColor(87, 198, 225, 255)), QGradientStop(0.79, QColor(180, 159, 218, 255)), QGradientStop(1, QColor(122, 197, 216, 255)));
+ case QGradient::MixedHopes:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(196, 113, 245, 255)), QGradientStop(1, QColor(250, 113, 205, 255)));
+ case QGradient::FlyHigh:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(72, 198, 239, 255)), QGradientStop(1, QColor(111, 134, 214, 255)));
+ case QGradient::StrongBliss:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(247, 140, 160, 255)), QGradientStop(0.19, QColor(249, 116, 143, 255)), QGradientStop(0.6, QColor(253, 134, 140, 255)), QGradientStop(1, QColor(254, 154, 139, 255)));
+ case QGradient::FreshMilk:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(254, 173, 166, 255)), QGradientStop(1, QColor(245, 239, 239, 255)));
+ case QGradient::SnowAgain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(230, 233, 240, 255)), QGradientStop(1, QColor(238, 241, 245, 255)));
+ case QGradient::FebruaryInk:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(172, 203, 238, 255)), QGradientStop(1, QColor(231, 240, 253, 255)));
+ case QGradient::KindSteel:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(233, 222, 250, 255)), QGradientStop(1, QColor(251, 252, 219, 255)));
+ case QGradient::SoftGrass:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(193, 223, 196, 255)), QGradientStop(1, QColor(222, 236, 221, 255)));
+ case QGradient::GrownEarly:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(11, 163, 96, 255)), QGradientStop(1, QColor(60, 186, 146, 255)));
+ case QGradient::SharpBlues:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 198, 251, 255)), QGradientStop(1, QColor(0, 91, 234, 255)));
+ case QGradient::ShadyWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(116, 235, 213, 255)), QGradientStop(1, QColor(159, 172, 230, 255)));
+ case QGradient::DirtyBeauty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(106, 133, 182, 255)), QGradientStop(1, QColor(186, 200, 224, 255)));
+ case QGradient::GreatWhale:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(163, 189, 237, 255)), QGradientStop(1, QColor(105, 145, 199, 255)));
+ case QGradient::TeenNotebook:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(151, 149, 240, 255)), QGradientStop(1, QColor(251, 200, 212, 255)));
+ case QGradient::PoliteRumors:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(167, 166, 203, 255)), QGradientStop(0.52, QColor(137, 137, 186, 255)), QGradientStop(1, QColor(137, 137, 186, 255)));
+ case QGradient::SweetPeriod:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(63, 81, 177, 255)), QGradientStop(0.13, QColor(90, 85, 174, 255)), QGradientStop(0.25, QColor(123, 95, 172, 255)), QGradientStop(0.38, QColor(143, 106, 174, 255)), QGradientStop(0.5, QColor(168, 106, 164, 255)), QGradientStop(0.62, QColor(204, 107, 142, 255)), QGradientStop(0.75, QColor(241, 130, 113, 255)), QGradientStop(0.87, QColor(243, 164, 105, 255)), QGradientStop(1, QColor(247, 201, 120, 255)));
+ case QGradient::WideMatrix:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(252, 197, 228, 255)), QGradientStop(0.15, QColor(253, 163, 75, 255)), QGradientStop(0.35, QColor(255, 120, 130, 255)), QGradientStop(0.52, QColor(200, 105, 158, 255)), QGradientStop(0.71, QColor(112, 70, 170, 255)), QGradientStop(0.87, QColor(12, 29, 184, 255)), QGradientStop(1, QColor(2, 15, 117, 255)));
+ case QGradient::SoftCherish:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(219, 220, 215, 255)), QGradientStop(0.24, QColor(221, 220, 215, 255)), QGradientStop(0.3, QColor(226, 201, 204, 255)), QGradientStop(0.46, QColor(231, 98, 125, 255)), QGradientStop(0.59, QColor(184, 35, 90, 255)), QGradientStop(0.71, QColor(128, 19, 87, 255)), QGradientStop(0.84, QColor(61, 22, 53, 255)), QGradientStop(1, QColor(28, 26, 39, 255)));
+ case QGradient::RedSalvation:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(244, 59, 71, 255)), QGradientStop(1, QColor(69, 58, 148, 255)));
+ case QGradient::BurningSpring:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(79, 181, 118, 255)), QGradientStop(0.3, QColor(68, 196, 137, 255)), QGradientStop(0.46, QColor(40, 169, 174, 255)), QGradientStop(0.59, QColor(40, 162, 183, 255)), QGradientStop(0.71, QColor(76, 119, 136, 255)), QGradientStop(0.86, QColor(108, 79, 99, 255)), QGradientStop(1, QColor(67, 44, 57, 255)));
+ case QGradient::NightParty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(2, 80, 197, 255)), QGradientStop(1, QColor(212, 63, 141, 255)));
+ case QGradient::SkyGlider:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(136, 211, 206, 255)), QGradientStop(1, QColor(110, 69, 226, 255)));
+ case QGradient::HeavenPeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(217, 175, 217, 255)), QGradientStop(1, QColor(151, 217, 225, 255)));
+ case QGradient::PurpleDivision:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(112, 40, 228, 255)), QGradientStop(1, QColor(229, 178, 202, 255)));
+ case QGradient::AquaSplash:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(19, 84, 122, 255)), QGradientStop(1, QColor(128, 208, 199, 255)));
+ case QGradient::SpikyNaga:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(80, 82, 133, 255)), QGradientStop(0.12, QColor(88, 94, 146, 255)), QGradientStop(0.25, QColor(101, 104, 159, 255)), QGradientStop(0.37, QColor(116, 116, 176, 255)), QGradientStop(0.5, QColor(126, 126, 187, 255)), QGradientStop(0.62, QColor(131, 137, 199, 255)), QGradientStop(0.75, QColor(151, 149, 212, 255)), QGradientStop(0.87, QColor(162, 161, 220, 255)), QGradientStop(1, QColor(181, 174, 228, 255)));
+ case QGradient::LoveKiss:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 8, 68, 255)), QGradientStop(1, QColor(255, 177, 153, 255)));
+ case QGradient::CleanMirror:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(147, 165, 207, 255)), QGradientStop(1, QColor(228, 239, 233, 255)));
+ case QGradient::PremiumDark:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(67, 67, 67, 255)), QGradientStop(1, QColor(0, 0, 0, 255)));
+ case QGradient::ColdEvening:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(12, 52, 131, 255)), QGradientStop(1, QColor(162, 182, 223, 255)), QGradientStop(1, QColor(107, 140, 206, 255)), QGradientStop(1, QColor(162, 182, 223, 255)));
+ case QGradient::CochitiLake:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(147, 165, 207, 255)), QGradientStop(1, QColor(228, 239, 233, 255)));
+ case QGradient::SummerGames:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(146, 254, 157, 255)), QGradientStop(1, QColor(0, 201, 255, 255)));
+ case QGradient::PassionateBed:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 117, 140, 255)), QGradientStop(1, QColor(255, 126, 179, 255)));
+ case QGradient::MountainRock:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(134, 143, 150, 255)), QGradientStop(1, QColor(89, 97, 100, 255)));
+ case QGradient::DesertHump:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(199, 144, 129, 255)), QGradientStop(1, QColor(223, 165, 121, 255)));
+ case QGradient::JungleDay:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(139, 170, 170, 255)), QGradientStop(1, QColor(174, 139, 156, 255)));
+ case QGradient::PhoenixStart:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(248, 54, 0, 255)), QGradientStop(1, QColor(249, 212, 35, 255)));
+ case QGradient::OctoberSilence:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(183, 33, 255, 255)), QGradientStop(1, QColor(33, 212, 253, 255)));
+ case QGradient::FarawayRiver:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(110, 69, 226, 255)), QGradientStop(1, QColor(136, 211, 206, 255)));
+ case QGradient::AlchemistLab:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(213, 88, 200, 255)), QGradientStop(1, QColor(36, 210, 146, 255)));
+ case QGradient::OverSun:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(171, 236, 214, 255)), QGradientStop(1, QColor(251, 237, 150, 255)));
+ case QGradient::PremiumWhite:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(213, 212, 208, 255)), QGradientStop(0.01, QColor(213, 212, 208, 255)), QGradientStop(0.31, QColor(238, 238, 236, 255)), QGradientStop(0.75, QColor(239, 238, 236, 255)), QGradientStop(1, QColor(233, 233, 231, 255)));
+ case QGradient::MarsParty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(95, 114, 189, 255)), QGradientStop(1, QColor(155, 35, 234, 255)));
+ case QGradient::EternalConstance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(9, 32, 63, 255)), QGradientStop(1, QColor(83, 120, 149, 255)));
+ case QGradient::JapanBlush:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(221, 214, 243, 255)), QGradientStop(1, QColor(250, 172, 168, 255)), QGradientStop(1, QColor(250, 172, 168, 255)));
+ case QGradient::SmilingRain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(220, 176, 237, 255)), QGradientStop(1, QColor(153, 201, 156, 255)));
+ case QGradient::CloudyApple:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(243, 231, 233, 255)), QGradientStop(0.99, QColor(227, 238, 255, 255)), QGradientStop(1, QColor(227, 238, 255, 255)));
+ case QGradient::BigMango:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(199, 29, 111, 255)), QGradientStop(1, QColor(208, 150, 147, 255)));
+ case QGradient::HealthyWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(150, 222, 218, 255)), QGradientStop(1, QColor(80, 201, 195, 255)));
+ case QGradient::AmourAmour:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(247, 112, 98, 255)), QGradientStop(1, QColor(254, 81, 150, 255)));
+ case QGradient::RiskyConcrete:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(196, 197, 199, 255)), QGradientStop(0.52, QColor(220, 221, 223, 255)), QGradientStop(1, QColor(235, 235, 235, 255)));
+ case QGradient::StrongStick:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(168, 202, 186, 255)), QGradientStop(1, QColor(93, 65, 87, 255)));
+ case QGradient::ViciousStance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(41, 50, 60, 255)), QGradientStop(1, QColor(72, 85, 99, 255)));
+ case QGradient::PaloAlto:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(22, 160, 133, 255)), QGradientStop(1, QColor(244, 208, 63, 255)));
+ case QGradient::HappyMemories:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 88, 88, 255)), QGradientStop(1, QColor(240, 152, 25, 255)));
+ case QGradient::MidnightBloom:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(43, 88, 118, 255)), QGradientStop(1, QColor(78, 67, 118, 255)));
+ case QGradient::Crystalline:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 205, 172, 255)), QGradientStop(1, QColor(141, 218, 213, 255)));
+ case QGradient::PartyBliss:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(68, 129, 235, 255)), QGradientStop(1, QColor(4, 190, 254, 255)));
+ case QGradient::ConfidentCloud:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(218, 212, 236, 255)), QGradientStop(0.01, QColor(218, 212, 236, 255)), QGradientStop(1, QColor(243, 231, 233, 255)));
+ case QGradient::LeCocktail:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(135, 77, 162, 255)), QGradientStop(1, QColor(196, 58, 48, 255)));
+ case QGradient::RiverCity:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(68, 129, 235, 255)), QGradientStop(1, QColor(4, 190, 254, 255)));
+ case QGradient::FrozenBerry:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(232, 25, 139, 255)), QGradientStop(1, QColor(199, 234, 253, 255)));
+ case QGradient::ChildCare:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(247, 148, 164, 255)), QGradientStop(1, QColor(253, 214, 189, 255)));
+ case QGradient::FlyingLemon:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(100, 179, 244, 255)), QGradientStop(1, QColor(194, 229, 156, 255)));
+ case QGradient::NewRetrowave:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(59, 65, 197, 255)), QGradientStop(0.49, QColor(169, 129, 187, 255)), QGradientStop(1, QColor(255, 200, 169, 255)));
+ case QGradient::HiddenJaguar:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(15, 216, 80, 255)), QGradientStop(1, QColor(249, 240, 71, 255)));
+ case QGradient::AboveTheSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(211, 211, 211, 255)), QGradientStop(0.01, QColor(211, 211, 211, 255)), QGradientStop(0.26, QColor(224, 224, 224, 255)), QGradientStop(0.48, QColor(239, 239, 239, 255)), QGradientStop(0.75, QColor(217, 217, 217, 255)), QGradientStop(1, QColor(188, 188, 188, 255)));
+ case QGradient::Nega:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(238, 156, 167, 255)), QGradientStop(1, QColor(255, 221, 225, 255)));
+ case QGradient::DenseWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(58, 181, 176, 255)), QGradientStop(0.31, QColor(61, 153, 190, 255)), QGradientStop(1, QColor(86, 49, 122, 255)));
+ case QGradient::Seashore:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(32, 156, 255, 255)), QGradientStop(1, QColor(104, 224, 207, 255)));
+ case QGradient::MarbleWall:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(189, 194, 232, 255)), QGradientStop(0.01, QColor(189, 194, 232, 255)), QGradientStop(1, QColor(230, 222, 233, 255)));
+ case QGradient::CheerfulCaramel:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(230, 185, 128, 255)), QGradientStop(1, QColor(234, 205, 163, 255)));
+ case QGradient::NightSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(30, 60, 114, 255)), QGradientStop(0.01, QColor(30, 60, 114, 255)), QGradientStop(1, QColor(42, 82, 152, 255)));
+ case QGradient::MagicLake:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(213, 222, 231, 255)), QGradientStop(0, QColor(255, 175, 189, 255)), QGradientStop(1, QColor(201, 255, 191, 255)));
+ case QGradient::YoungGrass:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(155, 225, 93, 255)), QGradientStop(1, QColor(0, 227, 174, 255)));
+ case QGradient::ColorfulPeach:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(237, 110, 160, 255)), QGradientStop(1, QColor(236, 140, 105, 255)));
+ case QGradient::GentleCare:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 195, 160, 255)), QGradientStop(1, QColor(255, 175, 189, 255)));
+ case QGradient::PlumBath:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(204, 32, 142, 255)), QGradientStop(1, QColor(103, 19, 210, 255)));
+ case QGradient::HappyUnicorn:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(179, 255, 171, 255)), QGradientStop(1, QColor(18, 255, 247, 255)));
+ case QGradient::AfricanField:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(101, 189, 96, 255)), QGradientStop(0.25, QColor(90, 193, 168, 255)), QGradientStop(0.5, QColor(62, 198, 237, 255)), QGradientStop(0.75, QColor(183, 221, 183, 255)), QGradientStop(1, QColor(254, 243, 129, 255)));
+ case QGradient::SolidStone:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(36, 57, 73, 255)), QGradientStop(1, QColor(81, 127, 164, 255)));
+ case QGradient::OrangeJuice:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(252, 96, 118, 255)), QGradientStop(1, QColor(255, 154, 68, 255)));
+ case QGradient::GlassWater:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(223, 233, 243, 255)), QGradientStop(1, QColor(255, 255, 255, 255)));
+ case QGradient::NorthMiracle:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 219, 222, 255)), QGradientStop(1, QColor(252, 0, 255, 255)));
+ case QGradient::FruitBlend:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(249, 212, 35, 255)), QGradientStop(1, QColor(255, 78, 80, 255)));
+ case QGradient::MillenniumPine:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(80, 204, 127, 255)), QGradientStop(1, QColor(245, 209, 0, 255)));
+ case QGradient::HighFlight:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(10, 207, 254, 255)), QGradientStop(1, QColor(73, 90, 255, 255)));
+ case QGradient::MoleHall:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(97, 97, 97, 255)), QGradientStop(1, QColor(155, 197, 195, 255)));
+ case QGradient::SpaceShift:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(61, 51, 147, 255)), QGradientStop(0.37, QColor(43, 118, 185, 255)), QGradientStop(0.65, QColor(44, 172, 209, 255)), QGradientStop(1, QColor(53, 235, 147, 255)));
+ case QGradient::ForestInei:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(223, 137, 181, 255)), QGradientStop(1, QColor(191, 217, 254, 255)));
+ case QGradient::RoyalGarden:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(237, 110, 160, 255)), QGradientStop(1, QColor(236, 140, 105, 255)));
+ case QGradient::RichMetal:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(215, 210, 204, 255)), QGradientStop(1, QColor(48, 67, 82, 255)));
+ case QGradient::JuicyCake:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(225, 79, 173, 255)), QGradientStop(1, QColor(249, 212, 35, 255)));
+ case QGradient::SmartIndigo:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(178, 36, 239, 255)), QGradientStop(1, QColor(117, 121, 255, 255)));
+ case QGradient::SandStrike:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(193, 193, 97, 255)), QGradientStop(0, QColor(193, 193, 97, 255)), QGradientStop(1, QColor(212, 212, 177, 255)));
+ case QGradient::NorseBeauty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(236, 119, 171, 255)), QGradientStop(1, QColor(120, 115, 245, 255)));
+ case QGradient::AquaGuidance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(0, 122, 223, 255)), QGradientStop(1, QColor(0, 236, 188, 255)));
+ case QGradient::SunVeggie:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(32, 226, 215, 255)), QGradientStop(1, QColor(249, 254, 165, 255)));
+ case QGradient::SeaLord:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(44, 216, 213, 255)), QGradientStop(0.56, QColor(197, 193, 255, 255)), QGradientStop(1, QColor(255, 186, 195, 255)));
+ case QGradient::BlackSea:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(44, 216, 213, 255)), QGradientStop(0.48, QColor(107, 141, 214, 255)), QGradientStop(1, QColor(142, 55, 215, 255)));
+ case QGradient::GrassShampoo:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(223, 255, 205, 255)), QGradientStop(0.48, QColor(144, 249, 196, 255)), QGradientStop(1, QColor(57, 243, 187, 255)));
+ case QGradient::LandingAircraft:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(93, 159, 255, 255)), QGradientStop(0.48, QColor(184, 220, 255, 255)), QGradientStop(1, QColor(107, 187, 255, 255)));
+ case QGradient::WitchDance:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(168, 191, 255, 255)), QGradientStop(1, QColor(136, 77, 128, 255)));
+ case QGradient::SleeplessNight:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(82, 113, 196, 255)), QGradientStop(0.48, QColor(177, 159, 255, 255)), QGradientStop(1, QColor(236, 161, 254, 255)));
+ case QGradient::AngelCare:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 226, 159, 255)), QGradientStop(0.48, QColor(255, 169, 159, 255)), QGradientStop(1, QColor(255, 113, 154, 255)));
+ case QGradient::CrystalRiver:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(34, 225, 255, 255)), QGradientStop(0.48, QColor(29, 143, 225, 255)), QGradientStop(1, QColor(98, 94, 177, 255)));
+ case QGradient::SoftLipstick:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(182, 206, 232, 255)), QGradientStop(1, QColor(245, 120, 220, 255)));
+ case QGradient::SaltMountain:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 254, 255, 255)), QGradientStop(1, QColor(215, 255, 254, 255)));
+ case QGradient::PerfectWhite:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(227, 253, 245, 255)), QGradientStop(1, QColor(255, 230, 250, 255)));
+ case QGradient::FreshOasis:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(125, 226, 252, 255)), QGradientStop(1, QColor(185, 182, 229, 255)));
+ case QGradient::StrictNovember:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(203, 186, 204, 255)), QGradientStop(1, QColor(37, 128, 179, 255)));
+ case QGradient::MorningSalad:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(183, 248, 219, 255)), QGradientStop(1, QColor(80, 167, 194, 255)));
+ case QGradient::DeepRelief:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(112, 133, 182, 255)), QGradientStop(0.5, QColor(135, 167, 217, 255)), QGradientStop(1, QColor(222, 243, 248, 255)));
+ case QGradient::SeaStrike:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(119, 255, 210, 255)), QGradientStop(0.48, QColor(98, 151, 219, 255)), QGradientStop(1, QColor(30, 236, 255, 255)));
+ case QGradient::NightCall:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(172, 50, 228, 255)), QGradientStop(0.48, QColor(121, 24, 242, 255)), QGradientStop(1, QColor(72, 1, 255, 255)));
+ case QGradient::SupremeSky:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(212, 255, 236, 255)), QGradientStop(0.48, QColor(87, 242, 204, 255)), QGradientStop(1, QColor(69, 150, 251, 255)));
+ case QGradient::LightBlue:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(158, 251, 211, 255)), QGradientStop(0.48, QColor(87, 233, 242, 255)), QGradientStop(1, QColor(69, 212, 251, 255)));
+ case QGradient::MindCrawl:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(71, 59, 123, 255)), QGradientStop(0.51, QColor(53, 132, 167, 255)), QGradientStop(1, QColor(48, 210, 190, 255)));
+ case QGradient::LilyMeadow:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(101, 55, 155, 255)), QGradientStop(0.53, QColor(136, 106, 234, 255)), QGradientStop(1, QColor(100, 87, 198, 255)));
+ case QGradient::SugarLollipop:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(164, 69, 178, 255)), QGradientStop(0.52, QColor(212, 24, 114, 255)), QGradientStop(1, QColor(255, 0, 102, 255)));
+ case QGradient::SweetDessert:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(119, 66, 178, 255)), QGradientStop(0.52, QColor(241, 128, 255, 255)), QGradientStop(1, QColor(253, 139, 217, 255)));
+ case QGradient::MagicRay:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 60, 172, 255)), QGradientStop(0.52, QColor(86, 43, 124, 255)), QGradientStop(1, QColor(43, 134, 197, 255)));
+ case QGradient::TeenParty:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 5, 124, 255)), QGradientStop(0.5, QColor(141, 11, 147, 255)), QGradientStop(1, QColor(50, 21, 117, 255)));
+ case QGradient::FrozenHeat:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(255, 5, 124, 255)), QGradientStop(0.48, QColor(124, 100, 213, 255)), QGradientStop(1, QColor(76, 195, 255, 255)));
+ case QGradient::GagarinView:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(105, 234, 203, 255)), QGradientStop(0.48, QColor(234, 204, 248, 255)), QGradientStop(1, QColor(102, 84, 241, 255)));
+ case QGradient::FabledSunset:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(35, 21, 87, 255)), QGradientStop(0.29, QColor(68, 16, 122, 255)), QGradientStop(0.67, QColor(255, 19, 97, 255)), QGradientStop(1, QColor(255, 248, 0, 255)));
+ case QGradient::PerfectBlue:
+ return Q_ARRAY_LITERAL(QGradientStop, QGradientStop(0, QColor(61, 78, 129, 255)), QGradientStop(0.48, QColor(87, 83, 201, 255)), QGradientStop(1, QColor(110, 127, 243, 255)));
+ case QGradient::NumPresets:
+ Q_UNREACHABLE();
+ }
+ Q_UNREACHABLE();
+ return {};
+}
+
+static Q_CONSTEXPR QGradient::QGradientData qt_preset_gradient_data[] = {
+ { { 0, 1, 1, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { -0.0915064, 0.158494, 1.09151, 0.841506 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 0, 0.5, 1 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.341506, 1.09151, 0.658494, -0.0915064 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 1.09151, 0.841506, -0.0915064, 0.158494 } },
+ { { 1.09151, 0.841506, -0.0915064, 0.158494 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 1, 1, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 0, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.719186, 1.10221, 0.280814, -0.102208 } },
+ { { 0, 0, 0, 0 } },
+ { { -0.0915064, 0.841506, 1.09151, 0.158494 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0, 0.5, 1, 0.5 } },
+ { { 0.5, 1, 0.5, 0 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+ { { 0, 0, 1, 1 } },
+};
+
+static void *qt_preset_gradient_dummy()
+{
+ union {void *p; uint i;};
+ p = 0;
+ i |= uint(QGradient::ObjectMode);
+ return p;
+}
diff --git a/src/gui/painting/webgradients.css b/src/gui/painting/webgradients.css
deleted file mode 100644
index 870866bb46..0000000000
--- a/src/gui/painting/webgradients.css
+++ /dev/null
@@ -1,909 +0,0 @@
-/*001 Warm Flame*/
-.warm_flame{
- background-image: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
-}
-
-/*002 Night Fade*/
-.night_fade{
- background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
-}
-
-/*003 Spring Warmth*/
-.spring_warmth{
- background-image: linear-gradient(to top, #fad0c4 0%, #fad0c4 1%, #ffd1ff 100%);
-}
-
-/*004 Juicy Peach*/
-.juicy_peach{
- background-image: linear-gradient(to right, #ffecd2 0%, #fcb69f 100%);
-}
-
-/*005 Young Passion*/
-.young_passion{
- background-image: linear-gradient(to right, #ff8177 0%, #ff867a 0%, #ff8c7f 21%, #f99185 52%, #cf556c 78%, #b12a5b 100%);
-}
-
-/*006 Lady Lips*/
-.lady_lips{
- background-image: linear-gradient(to top, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
-}
-
-/*007 Sunny Morning*/
-.sunny_morning{
- background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
-}
-
-/*008 Rainy Ashville*/
-.rainy_ashville{
- background-image: linear-gradient(to top, #fbc2eb 0%, #a6c1ee 100%);
-}
-
-/*009 Frozen Dreams*/
-.frozen_dreams{
- background-image: linear-gradient(to top, #fdcbf1 0%, #fdcbf1 1%, #e6dee9 100%);
-}
-
-/*010 Winter Neva*/
-.winter_neva{
- background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
-}
-
-/*011 Dusty Grass*/
-.dusty_grass{
- background-image: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
-}
-
-/*012 Tempting Azure*/
-.tempting_azure{
- background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
-}
-
-/*013 Heavy Rain*/
-.heavy_rain{
- background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
-}
-
-/*014 Amy Crisp*/
-.amy_crisp{
- background-image: linear-gradient(120deg, #a6c0fe 0%, #f68084 100%);
-}
-
-/*015 Mean Fruit*/
-.mean_fruit{
- background-image: linear-gradient(120deg, #fccb90 0%, #d57eeb 100%);
-}
-
-/*016 Deep Blue*/
-.deep_blue{
- background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
-}
-
-/*017 Ripe Malinka*/
-.ripe_malinka{
- background-image: linear-gradient(120deg, #f093fb 0%, #f5576c 100%);
-}
-
-/*018 Cloudy Knoxville*/
-.cloudy_knoxville{
- background-image: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
-}
-
-/*019 Malibu Beach*/
-.malibu_beach{
- background-image: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
-}
-
-/*020 New Life*/
-.new_life{
- background-image: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
-}
-
-/*021 True Sunset*/
-.true_sunset{
- background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%);
-}
-
-/*022 Morpheus Den*/
-.morpheus_den{
- background-image: linear-gradient(to top, #30cfd0 0%, #330867 100%);
-}
-
-/*023 Rare Wind*/
-.rare_wind{
- background-image: linear-gradient(to top, #a8edea 0%, #fed6e3 100%);
-}
-
-/*024 Near Moon*/
-.near_moon{
- background-image: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
-}
-
-/*025 Wild Apple*/
-.wild_apple{
- background-image: linear-gradient(to top, #d299c2 0%, #fef9d7 100%);
-}
-
-/*026 Saint Petersburg*/
-.saint_petersburg{
- background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
-}
-
-/*027 Arielle's Smile*/
-.arielles_smile{
- background-image: radial-gradient(circle 248px at center, #16d9e3 0%, #30c7ec 47%, #46aef7 100%);
-}
-
-/*028 Plum Plate*/
-.plum_plate{
- background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-}
-
-/*029 Everlasting Sky*/
-.everlasting_sky{
- background-image: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
-}
-
-/*030 Happy Fisher*/
-.happy_fisher{
- background-image: linear-gradient(120deg, #89f7fe 0%, #66a6ff 100%);
-}
-
-/*031 Blessing*/
-.blessing{
- background-image: linear-gradient(to top, #fddb92 0%, #d1fdff 100%);
-}
-
-/*032 Sharpeye Eagle*/
-.sharpeye_eagle{
- background-image: linear-gradient(to top, #9890e3 0%, #b1f4cf 100%);
-}
-
-/*033 Ladoga Bottom*/
-.ladoga_bottom{
- background-image: linear-gradient(to top, #ebc0fd 0%, #d9ded8 100%);
-}
-
-/*034 Lemon Gate*/
-.lemon_gate{
- background-image: linear-gradient(to top, #96fbc4 0%, #f9f586 100%);
-}
-
-/*035 Itmeo Branding*/
-.itmeo_branding{
- background-image: linear-gradient(180deg, #2af598 0%, #009efd 100%);
-}
-
-/*036 Zeus Miracle*/
-.zeus_miracle{
- background-image: linear-gradient(to top, #cd9cf2 0%, #f6f3ff 100%);
-}
-
-/*037 Old Hat*/
-.old_hat{
- background-image: linear-gradient(to right, #e4afcb 0%, #b8cbb8 0%, #b8cbb8 0%, #e2c58b 30%, #c2ce9c 64%, #7edbdc 100%);
-}
-
-/*038 Star Wine*/
-.star_wine{
- background-image: linear-gradient(to right, #b8cbb8 0%, #b8cbb8 0%, #b465da 0%, #cf6cc9 33%, #ee609c 66%, #ee609c 100%);
-}
-
-/*039 Deep Blue*/
-.deep_blue{
- background-image: linear-gradient(to right, #6a11cb 0%, #2575fc 100%);
-}
-
-/*040 Coup de Grace*/
-.coup_de_grace{
- background: #DCD9D4 linear-gradient(to bottom, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%), radial-gradient(at 50% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(0, 0, 0, 0.50) 50%);
- background-blend-mode: soft-light,screen;
-}
-
-/*041 Happy Acid*/
-.happy_acid{
- background-image: linear-gradient(to top, #37ecba 0%, #72afd3 100%);
-}
-
-/*042 Awesome Pine*/
-.awesome_pine{
- background-image: linear-gradient(to top, #ebbba7 0%, #cfc7f8 100%);
-}
-
-/*043 New York*/
-.new_york{
- background-image: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
-}
-
-/*044 Shy Rainbow*/
-.shy_rainbow{
- background-image: linear-gradient(to right, #eea2a2 0%, #bbc1bf 19%, #57c6e1 42%, #b49fda 79%, #7ac5d8 100%);
-}
-
-/*045 Loon Crest*/
-.loon_crest{
- background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
- background-blend-mode: multiply,multiply;
-}
-
-/*046 Mixed Hopes*/
-.mixed_hopes{
- background-image: linear-gradient(to top, #c471f5 0%, #fa71cd 100%);
-}
-
-/*047 Fly High*/
-.fly_high{
- background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%);
-}
-
-/*048 Strong Bliss*/
-.strong_bliss{
- background-image: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
-}
-
-/*049 Fresh Milk*/
-.fresh_milk{
- background-image: linear-gradient(to top, #feada6 0%, #f5efef 100%);
-}
-
-/*050 Snow Again*/
-.snow_again{
- background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
-}
-
-/*051 February Ink*/
-.february_ink{
- background-image: linear-gradient(to top, #accbee 0%, #e7f0fd 100%);
-}
-
-/*052 Kind Steel*/
-.kind_steel{
- background-image: linear-gradient(-20deg, #e9defa 0%, #fbfcdb 100%);
-}
-
-/*053 Soft Grass*/
-.soft_grass{
- background-image: linear-gradient(to top, #c1dfc4 0%, #deecdd 100%);
-}
-
-/*054 Grown Early*/
-.grown_early{
- background-image: linear-gradient(to top, #0ba360 0%, #3cba92 100%);
-}
-
-/*055 Sharp Blues*/
-.sharp_blues{
- background-image: linear-gradient(to top, #00c6fb 0%, #005bea 100%);
-}
-
-/*056 Shady Water*/
-.shady_water{
- background-image: linear-gradient(to right, #74ebd5 0%, #9face6 100%);
-}
-
-/*057 Dirty Beauty*/
-.dirty_beauty{
- background-image: linear-gradient(to top, #6a85b6 0%, #bac8e0 100%);
-}
-
-/*058 Great Whale*/
-.great_whale{
- background-image: linear-gradient(to top, #a3bded 0%, #6991c7 100%);
-}
-
-/*059 Teen Notebook*/
-.teen_notebook{
- background-image: linear-gradient(to top, #9795f0 0%, #fbc8d4 100%);
-}
-
-/*060 Polite Rumors*/
-.polite_rumors{
- background-image: linear-gradient(to top, #a7a6cb 0%, #8989ba 52%, #8989ba 100%);
-}
-
-/*061 Sweet Period*/
-.sweet_period{
- background-image: linear-gradient(to top, #3f51b1 0%, #5a55ae 13%, #7b5fac 25%, #8f6aae 38%, #a86aa4 50%, #cc6b8e 62%, #f18271 75%, #f3a469 87%, #f7c978 100%);
-}
-
-/*062 Wide Matrix*/
-.wide_matrix{
- background-image: linear-gradient(to top, #fcc5e4 0%, #fda34b 15%, #ff7882 35%, #c8699e 52%, #7046aa 71%, #0c1db8 87%, #020f75 100%);
-}
-
-/*063 Soft Cherish*/
-.soft_cherish{
- background-image: linear-gradient(to top, #dbdcd7 0%, #dddcd7 24%, #e2c9cc 30%, #e7627d 46%, #b8235a 59%, #801357 71%, #3d1635 84%, #1c1a27 100%);
-}
-
-/*064 Red Salvation*/
-.red_salvation{
- background-image: linear-gradient(to top, #f43b47 0%, #453a94 100%);
-}
-
-/*065 Burning Spring*/
-.burning_spring{
- background-image: linear-gradient(to top, #4fb576 0%, #44c489 30%, #28a9ae 46%, #28a2b7 59%, #4c7788 71%, #6c4f63 86%, #432c39 100%);
-}
-
-/*066 Night Party*/
-.night_party{
- background-image: linear-gradient(to top, #0250c5 0%, #d43f8d 100%);
-}
-
-/*067 Sky Glider*/
-.sky_glider{
- background-image: linear-gradient(to top, #88d3ce 0%, #6e45e2 100%);
-}
-
-/*068 Heaven Peach*/
-.heaven_peach{
- background-image: linear-gradient(to top, #d9afd9 0%, #97d9e1 100%);
-}
-
-/*069 Purple Division*/
-.purple_division{
- background-image: linear-gradient(to top, #7028e4 0%, #e5b2ca 100%);
-}
-
-/*070 Aqua Splash*/
-.aqua_splash{
- background-image: linear-gradient(15deg, #13547a 0%, #80d0c7 100%);
-}
-
-/*071 Above Clouds*/
-.above_clouds{
- background-image: linear-gradient(to left, #BDBBBE 0%, #9D9EA3 100%), radial-gradient(88% 271%, rgba(255, 255, 255, 0.25) 0%, rgba(254, 254, 254, 0.25) 1%, rgba(0, 0, 0, 0.25) 100%), radial-gradient(50% 100%, rgba(255, 255, 255, 0.30) 0%, rgba(0, 0, 0, 0.30) 100%);
- background-blend-mode: normal, lighten, soft-light;
-}
-
-/*072 Spiky Naga*/
-.spiky_naga{
- background-image: linear-gradient(to top, #505285 0%, #585e92 12%, #65689f 25%, #7474b0 37%, #7e7ebb 50%, #8389c7 62%, #9795d4 75%, #a2a1dc 87%, #b5aee4 100%);
-}
-
-/*073 Love Kiss*/
-.love_kiss{
- background-image: linear-gradient(to top, #ff0844 0%, #ffb199 100%);
-}
-
-/*074 Sharp Glass*/
-.sharp_glass{
- background: #C9CCD3 linear-gradient(-180deg, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%);
- background-blend-mode: lighten;
-}
-
-/*075 Clean Mirror*/
-.clean_mirror{
- background-image: linear-gradient(45deg, #93a5cf 0%, #e4efe9 100%);
-}
-
-/*076 Premium Dark*/
-.premium_dark{
- background-image: linear-gradient(to right, #434343 0%, black 100%);
-}
-
-/*077 Cold Evening*/
-.cold_evening{
- background-image: linear-gradient(to top, #0c3483 0%, #a2b6df 100%, #6b8cce 100%, #a2b6df 100%);
-}
-
-/*078 Cochiti Lake*/
-.cochiti_lake{
- background-image: linear-gradient(45deg, #93a5cf 0%, #e4efe9 100%);
-}
-
-/*079 Summer Games*/
-.summer_games{
- background-image: linear-gradient(to right, #92fe9d 0%, #00c9ff 100%);
-}
-
-/*080 Passionate Bed*/
-.passionate_bed{
- background-image: linear-gradient(to right, #ff758c 0%, #ff7eb3 100%);
-}
-
-/*081 Mountain Rock*/
-.mountain_rock{
- background-image: linear-gradient(to right, #868f96 0%, #596164 100%);
-}
-
-/*082 Desert Hump*/
-.desert_hump{
- background-image: linear-gradient(to top, #c79081 0%, #dfa579 100%);
-}
-
-/*083 Jungle Day*/
-.jungle_day{
- background-image: linear-gradient(45deg, #8baaaa 0%, #ae8b9c 100%);
-}
-
-/*084 Phoenix Start*/
-.phoenix_start{
- background-image: linear-gradient(to right, #f83600 0%, #f9d423 100%);
-}
-
-/*085 October Silence*/
-.october_silence{
- background-image: linear-gradient(-20deg, #b721ff 0%, #21d4fd 100%);
-}
-
-/*086 Faraway River*/
-.faraway_river{
- background-image: linear-gradient(-20deg, #6e45e2 0%, #88d3ce 100%);
-}
-
-/*087 Alchemist Lab*/
-.alchemist_lab{
- background-image: linear-gradient(-20deg, #d558c8 0%, #24d292 100%);
-}
-
-/*088 Over Sun*/
-.over_sun{
- background-image: linear-gradient(60deg, #abecd6 0%, #fbed96 100%);
-}
-
-/*089 Premium White*/
-.premium_white{
- background-image: linear-gradient(to top, #d5d4d0 0%, #d5d4d0 1%, #eeeeec 31%, #efeeec 75%, #e9e9e7 100%);
-}
-
-/*090 Mars Party*/
-.mars_party{
- background-image: linear-gradient(to top, #5f72bd 0%, #9b23ea 100%);
-}
-
-/*091 Eternal Constance*/
-.eternal_constance{
- background-image: linear-gradient(to top, #09203f 0%, #537895 100%);
-}
-
-/*092 Japan Blush*/
-.japan_blush{
- background-image: linear-gradient(-20deg, #ddd6f3 0%, #faaca8 100%, #faaca8 100%);
-}
-
-/*093 Smiling Rain*/
-.smiling_rain{
- background-image: linear-gradient(-20deg, #dcb0ed 0%, #99c99c 100%);
-}
-
-/*094 Cloudy Apple*/
-.cloudy_apple{
- background-image: linear-gradient(to top, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%);
-}
-
-/*095 Big Mango*/
-.big_mango{
- background-image: linear-gradient(to top, #c71d6f 0%, #d09693 100%);
-}
-
-/*096 Healthy Water*/
-.healthy_water{
- background-image: linear-gradient(60deg, #96deda 0%, #50c9c3 100%);
-}
-
-/*097 Amour Amour*/
-.amour_amour{
- background-image: linear-gradient(to top, #f77062 0%, #fe5196 100%);
-}
-
-/*098 Risky Concrete*/
-.risky_concrete{
- background-image: linear-gradient(to top, #c4c5c7 0%, #dcdddf 52%, #ebebeb 100%);
-}
-
-/*099 Strong Stick*/
-.strong_stick{
- background-image: linear-gradient(to right, #a8caba 0%, #5d4157 100%);
-}
-
-/*100 Vicious Stance*/
-.vicious_stance{
- background-image: linear-gradient(60deg, #29323c 0%, #485563 100%);
-}
-
-/*101 Palo Alto*/
-.palo_alto{
- background-image: linear-gradient(-60deg, #16a085 0%, #f4d03f 100%);
-}
-
-/*102 Happy Memories*/
-.happy_memories{
- background-image: linear-gradient(-60deg, #ff5858 0%, #f09819 100%);
-}
-
-/*103 Midnight Bloom*/
-.midnight_bloom{
- background-image: linear-gradient(-20deg, #2b5876 0%, #4e4376 100%);
-}
-
-/*104 Crystalline*/
-.crystalline{
- background-image: linear-gradient(-20deg, #00cdac 0%, #8ddad5 100%);
-}
-
-/*105 Raccoon Back*/
-.raccoon_back{
- background: linear-gradient(-180deg, #BCC5CE 0%, #929EAD 98%), radial-gradient(at top left, rgba(255,255,255,0.30) 0%, rgba(0,0,0,0.30) 100%);
- background-blend-mode: screen;
-}
-
-/*106 Party Bliss*/
-.party_bliss{
- background-image: linear-gradient(to top, #4481eb 0%, #04befe 100%);
-}
-
-/*107 Confident Cloud*/
-.confident_cloud{
- background-image: linear-gradient(to top, #dad4ec 0%, #dad4ec 1%, #f3e7e9 100%);
-}
-
-/*108 Le Cocktail*/
-.le_cocktail{
- background-image: linear-gradient(45deg, #874da2 0%, #c43a30 100%);
-}
-
-/*109 River City*/
-.river_city{
- background-image: linear-gradient(to top, #4481eb 0%, #04befe 100%);
-}
-
-/*110 Frozen Berry*/
-.frozen_berry{
- background-image: linear-gradient(to top, #e8198b 0%, #c7eafd 100%);
-}
-
-/*111 Elegance*/
-.elegance{
- background-image: radial-gradient(73% 147%, #EADFDF 59%, #ECE2DF 100%), radial-gradient(91% 146%, rgba(255,255,255,0.50) 47%, rgba(0,0,0,0.50) 100%);
- background-blend-mode: screen;
-}
-
-/*112 Child Care*/
-.child_care{
- background-image: linear-gradient(-20deg, #f794a4 0%, #fdd6bd 100%);
-}
-
-/*113 Flying Lemon*/
-.flying_lemon{
- background-image: linear-gradient(60deg, #64b3f4 0%, #c2e59c 100%);
-}
-
-/*114 New Retrowave*/
-.new_retrowave{
- background-image: linear-gradient(to top, #3b41c5 0%, #a981bb 49%, #ffc8a9 100%);
-}
-
-/*115 Hidden Jaguar*/
-.hidden_jaguar{
- background-image: linear-gradient(to top, #0fd850 0%, #f9f047 100%);
-}
-
-/*116 Above The Sky*/
-.above_the_sky{
- background-image: linear-gradient(to top, lightgrey 0%, lightgrey 1%, #e0e0e0 26%, #efefef 48%, #d9d9d9 75%, #bcbcbc 100%);
-}
-
-/*117 Nega*/
-.nega{
- background-image: linear-gradient(45deg, #ee9ca7 0%, #ffdde1 100%);
-}
-
-/*118 Dense Water*/
-.dense_water{
- background-image: linear-gradient(to right, #3ab5b0 0%, #3d99be 31%, #56317a 100%);
-}
-
-/*119 Chemic Aqua*/
-.chemic_aqua{
- background: #CDDCDC radial-gradient(at 50% 100%, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%), linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 0.25) 100%);
- background-blend-mode: screen, overlay;
-}
-
-/*120 Seashore*/
-.seashore{
- background-image: linear-gradient(to top, #209cff 0%, #68e0cf 100%);
-}
-
-/*121 Marble Wall*/
-.marble_wall{
- background-image: linear-gradient(to top, #bdc2e8 0%, #bdc2e8 1%, #e6dee9 100%);
-}
-
-/*122 Cheerful Caramel*/
-.cheerful_caramel{
- background-image: linear-gradient(to top, #e6b980 0%, #eacda3 100%);
-}
-
-/*123 Night Sky*/
-.night_sky{
- background-image: linear-gradient(to top, #1e3c72 0%, #1e3c72 1%, #2a5298 100%);
-}
-
-/*124 Magic Lake*/
-.magic_lake{
- background-image: linear-gradient(to top, #d5dee7 0%, #ffafbd 0%, #c9ffbf 100%);
-}
-
-/*125 Young Grass*/
-.young_grass{
- background-image: linear-gradient(to top, #9be15d 0%, #00e3ae 100%);
-}
-
-/*126 Colorful Peach*/
-.colorful_peach{
- background-image: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
-}
-
-/*127 Gentle Care*/
-.gentle_care{
- background-image: linear-gradient(to right, #ffc3a0 0%, #ffafbd 100%);
-}
-
-/*128 Plum Bath*/
-.plum_bath{
- background-image: linear-gradient(to top, #cc208e 0%, #6713d2 100%);
-}
-
-/*129 Happy Unicorn*/
-.happy_unicorn{
- background-image: linear-gradient(to top, #b3ffab 0%, #12fff7 100%);
-}
-
-/*130 Full Metal*/
-.full_metal{
- background: linear-gradient(to bottom, #D5DEE7 0%, #E8EBF2 50%, #E2E7ED 100%), linear-gradient(to bottom, rgba(0,0,0,0.02) 50%, rgba(255,255,255,0.02) 61%, rgba(0,0,0,0.02) 73%), linear-gradient(33deg, rgba(255,255,255,0.20) 0%, rgba(0,0,0,0.20) 100%);
- background-blend-mode: normal,color-burn;
-}
-
-/*131 African Field*/
-.african_field{
- background-image: linear-gradient(to top, #65bd60 0%, #5ac1a8 25%, #3ec6ed 50%, #b7ddb7 75%, #fef381 100%);
-}
-
-/*132 Solid Stone*/
-.solid_stone{
- background-image: linear-gradient(to right, #243949 0%, #517fa4 100%);
-}
-
-/*133 Orange Juice*/
-.orange_juice{
- background-image: linear-gradient(-20deg, #fc6076 0%, #ff9a44 100%);
-}
-
-/*134 Glass Water*/
-.glass_water{
- background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
-}
-
-/*135 Slick Carbon*/
-.slick_carbon{
- background: linear-gradient(to bottom, #323232 0%, #3F3F3F 40%, #1C1C1C 150%), linear-gradient(to top, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.25) 200%);
- background-blend-mode: multiply;
-}
-
-/*136 North Miracle*/
-.north_miracle{
- background-image: linear-gradient(to right, #00dbde 0%, #fc00ff 100%);
-}
-
-/*137 Fruit Blend*/
-.fruit_blend{
- background-image: linear-gradient(to right, #f9d423 0%, #ff4e50 100%);
-}
-
-/*138 Millennium Pine*/
-.millennium_pine{
- background-image: linear-gradient(to top, #50cc7f 0%, #f5d100 100%);
-}
-
-/*139 High Flight*/
-.high_flight{
- background-image: linear-gradient(to right, #0acffe 0%, #495aff 100%);
-}
-
-/*140 Mole Hall*/
-.mole_hall{
- background-image: linear-gradient(-20deg, #616161 0%, #9bc5c3 100%);
-}
-
-/*141 Earl Gray*/
-.earl_gray{
- background: #E4E4E1 radial-gradient(at top center, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.03) 100%), linear-gradient(to top, rgba(255, 255, 255, 0.1) 0%, rgba(143, 152, 157, 0.60) 100%);
- background-blend-mode: normal, multiply;
-}
-
-/*142 Space Shift*/
-.space_shift{
- background-image: linear-gradient(60deg, #3d3393 0%, #2b76b9 37%, #2cacd1 65%, #35eb93 100%);
-}
-
-/*143 Forest Inei*/
-.forest_inei{
- background-image: linear-gradient(to top, #df89b5 0%, #bfd9fe 100%);
-}
-
-/*144 Royal Garden*/
-.royal_garden{
- background-image: linear-gradient(to right, #ed6ea0 0%, #ec8c69 100%);
-}
-
-/*145 Rich Metal*/
-.rich_metal{
- background-image: linear-gradient(to right, #d7d2cc 0%, #304352 100%);
-}
-
-/*146 Juicy Cake*/
-.juicy_cake{
- background-image: linear-gradient(to top, #e14fad 0%, #f9d423 100%);
-}
-
-/*147 Smart Indigo*/
-.smart_indigo{
- background-image: linear-gradient(to top, #b224ef 0%, #7579ff 100%);
-}
-
-/*148 Sand Strike*/
-.sand_strike{
- background-image: linear-gradient(to right, #c1c161 0%, #c1c161 0%, #d4d4b1 100%);
-}
-
-/*149 Norse Beauty*/
-.norse_beauty{
- background-image: linear-gradient(to right, #ec77ab 0%, #7873f5 100%);
-}
-
-/*150 Aqua Guidance*/
-.aqua_guidance{
- background-image: linear-gradient(to top, #007adf 0%, #00ecbc 100%);
-}
-
-/*151 Sun Veggie*/
-.sun_veggie{
- background-image: linear-gradient(-225deg, #20E2D7 0%, #F9FEA5 100%);
-}
-
-/*152 Sea Lord*/
-.sea_lord{
- background-image: linear-gradient(-225deg, #2CD8D5 0%, #C5C1FF 56%, #FFBAC3 100%);
-}
-
-/*153 Black Sea*/
-.black_sea{
- background-image: linear-gradient(-225deg, #2CD8D5 0%, #6B8DD6 48%, #8E37D7 100%);
-}
-
-/*154 Grass Shampoo*/
-.grass_shampoo{
- background-image: linear-gradient(-225deg, #DFFFCD 0%, #90F9C4 48%, #39F3BB 100%);
-}
-
-/*155 Landing Aircraft*/
-.landing_aircraft{
- background-image: linear-gradient(-225deg, #5D9FFF 0%, #B8DCFF 48%, #6BBBFF 100%);
-}
-
-/*156 Witch Dance*/
-.witch_dance{
- background-image: linear-gradient(-225deg, #A8BFFF 0%, #884D80 100%);
-}
-
-/*157 Sleepless Night*/
-.sleepless_night{
- background-image: linear-gradient(-225deg, #5271C4 0%, #B19FFF 48%, #ECA1FE 100%);
-}
-
-/*158 Angel Care*/
-.angel_care{
- background-image: linear-gradient(-225deg, #FFE29F 0%, #FFA99F 48%, #FF719A 100%);
-}
-
-/*159 Crystal River*/
-.crystal_river{
- background-image: linear-gradient(-225deg, #22E1FF 0%, #1D8FE1 48%, #625EB1 100%);
-}
-
-/*160 Soft Lipstick*/
-.soft_lipstick{
- background-image: linear-gradient(-225deg, #B6CEE8 0%, #F578DC 100%);
-}
-
-/*161 Salt Mountain*/
-.salt_mountain{
- background-image: linear-gradient(-225deg, #FFFEFF 0%, #D7FFFE 100%);
-}
-
-/*162 Perfect White*/
-.perfect_white{
- background-image: linear-gradient(-225deg, #E3FDF5 0%, #FFE6FA 100%);
-}
-
-/*163 Fresh Oasis*/
-.fresh_oasis{
- background-image: linear-gradient(-225deg, #7DE2FC 0%, #B9B6E5 100%);
-}
-
-/*164 Strict November*/
-.strict_november{
- background-image: linear-gradient(-225deg, #CBBACC 0%, #2580B3 100%);
-}
-
-/*165 Morning Salad*/
-.morning_salad{
- background-image: linear-gradient(-225deg, #B7F8DB 0%, #50A7C2 100%);
-}
-
-/*166 Deep Relief*/
-.deep_relief{
- background-image: linear-gradient(-225deg, #7085B6 0%, #87A7D9 50%, #DEF3F8 100%);
-}
-
-/*167 Sea Strike*/
-.sea_strike{
- background-image: linear-gradient(-225deg, #77FFD2 0%, #6297DB 48%, #1EECFF 100%);
-}
-
-/*168 Night Call*/
-.night_call{
- background-image: linear-gradient(-225deg, #AC32E4 0%, #7918F2 48%, #4801FF 100%);
-}
-
-/*169 Supreme Sky*/
-.supreme_sky{
- background-image: linear-gradient(-225deg, #D4FFEC 0%, #57F2CC 48%, #4596FB 100%);
-}
-
-/*170 Light Blue*/
-.light_blue{
- background-image: linear-gradient(-225deg, #9EFBD3 0%, #57E9F2 48%, #45D4FB 100%);
-}
-
-/*171 Mind Crawl*/
-.mind_crawl{
- background-image: linear-gradient(-225deg, #473B7B 0%, #3584A7 51%, #30D2BE 100%);
-}
-
-/*172 Lily Meadow*/
-.lily_meadow{
- background-image: linear-gradient(-225deg, #65379B 0%, #886AEA 53%, #6457C6 100%);
-}
-
-/*173 Sugar Lollipop*/
-.sugar_lollipop{
- background-image: linear-gradient(-225deg, #A445B2 0%, #D41872 52%, #FF0066 100%);
-}
-
-/*174 Sweet Dessert*/
-.sweet_dessert{
- background-image: linear-gradient(-225deg, #7742B2 0%, #F180FF 52%, #FD8BD9 100%);
-}
-
-/*175 Magic Ray*/
-.magic_ray{
- background-image: linear-gradient(-225deg, #FF3CAC 0%, #562B7C 52%, #2B86C5 100%);
-}
-
-/*176 Teen Party*/
-.teen_party{
- background-image: linear-gradient(-225deg, #FF057C 0%, #8D0B93 50%, #321575 100%);
-}
-
-/*177 Frozen Heat*/
-.frozen_heat{
- background-image: linear-gradient(-225deg, #FF057C 0%, #7C64D5 48%, #4CC3FF 100%);
-}
-
-/*178 Gagarin View*/
-.gagarin_view{
- background-image: linear-gradient(-225deg, #69EACB 0%, #EACCF8 48%, #6654F1 100%);
-}
-
-/*179 Fabled Sunset*/
-.fabled_sunset{
- background-image: linear-gradient(-225deg, #231557 0%, #44107A 29%, #FF1361 67%, #FFF800 100%);
-}
-
-/*180 Perfect Blue*/
-.perfect_blue{
- background-image: linear-gradient(-225deg, #3D4E81 0%, #5753C9 48%, #6E7FF3 100%);
-}