summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qdrawhelper.cpp4
-rw-r--r--src/gui/painting/qpagelayout.cpp8
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp7
-rw-r--r--src/gui/painting/qpainterpath.h2
-rw-r--r--src/gui/painting/qpdf.cpp1
-rw-r--r--src/gui/painting/qstroker.cpp6
6 files changed, 19 insertions, 9 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 04433c7703a..697ede42d92 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -930,7 +930,7 @@ static inline bool canUseFastMatrixPath(const qreal cx, const qreal cy, const qs
minc = std::min(minc, std::min(fx, fy));
maxc = std::max(maxc, std::max(fx, fy));
- return minc >= std::numeric_limits<int>::min() && maxc <= std::numeric_limits<int>::max();
+ return minc >= std::numeric_limits<int>::min() && maxc <= qreal(std::numeric_limits<int>::max());
}
template<TextureBlendType blendType, QPixelLayout::BPP bpp, typename T>
@@ -5179,7 +5179,7 @@ static inline bool calculate_fixed_gradient_factors(int count, const QT_FT_Span
const int gss = GRADIENT_STOPTABLE_SIZE - 1;
qreal ryinc = linear.dy * data->m22 * gss * FIXPT_SIZE;
qreal roff = (linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss * FIXPT_SIZE;
- const int limit = std::numeric_limits<int>::max() - FIXPT_SIZE;
+ const qreal limit = qreal(std::numeric_limits<int>::max() - FIXPT_SIZE);
if (count && (std::fabs(ryinc) < limit) && (std::fabs(roff) < limit)
&& (std::fabs(ryinc * spans->y + roff) < limit)
&& (std::fabs(ryinc * (spans + count - 1)->y + roff) < limit)) {
diff --git a/src/gui/painting/qpagelayout.cpp b/src/gui/painting/qpagelayout.cpp
index e6f346dcdf2..17fb6491b75 100644
--- a/src/gui/painting/qpagelayout.cpp
+++ b/src/gui/painting/qpagelayout.cpp
@@ -606,7 +606,7 @@ bool QPageLayout::setLeftMargin(qreal leftMargin, OutOfBoundsPolicy outOfBoundsP
if (d->m_mode == StandardMode && outOfBoundsPolicy == OutOfBoundsPolicy::Clamp)
leftMargin = qBound(d->m_minMargins.left(), leftMargin, d->m_maxMargins.left());
- if (qFuzzyCompare(leftMargin, d->m_margins.left()))
+ if (QtPrivate::fuzzyCompare(leftMargin, d->m_margins.left()))
return true;
if (d->m_mode == FullPageMode
@@ -637,7 +637,7 @@ bool QPageLayout::setRightMargin(qreal rightMargin, OutOfBoundsPolicy outOfBound
if (d->m_mode == StandardMode && outOfBoundsPolicy == OutOfBoundsPolicy::Clamp)
rightMargin = qBound(d->m_minMargins.right(), rightMargin, d->m_maxMargins.right());
- if (qFuzzyCompare(rightMargin, d->m_margins.right()))
+ if (QtPrivate::fuzzyCompare(rightMargin, d->m_margins.right()))
return true;
if (d->m_mode == FullPageMode
@@ -668,7 +668,7 @@ bool QPageLayout::setTopMargin(qreal topMargin, OutOfBoundsPolicy outOfBoundsPol
if (d->m_mode == StandardMode && outOfBoundsPolicy == OutOfBoundsPolicy::Clamp)
topMargin = qBound(d->m_minMargins.top(), topMargin, d->m_maxMargins.top());
- if (qFuzzyCompare(topMargin, d->m_margins.top()))
+ if (QtPrivate::fuzzyCompare(topMargin, d->m_margins.top()))
return true;
if (d->m_mode == FullPageMode
@@ -699,7 +699,7 @@ bool QPageLayout::setBottomMargin(qreal bottomMargin, OutOfBoundsPolicy outOfBou
if (d->m_mode == StandardMode && outOfBoundsPolicy == OutOfBoundsPolicy::Clamp)
bottomMargin = qBound(d->m_minMargins.bottom(), bottomMargin, d->m_maxMargins.bottom());
- if (qFuzzyCompare(bottomMargin, d->m_margins.bottom()))
+ if (QtPrivate::fuzzyCompare(bottomMargin, d->m_margins.bottom()))
return true;
if (d->m_mode == FullPageMode
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 74321705ff5..8e815394849 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2881,6 +2881,7 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
/*!
+ * \internal
* Returns \c true if the rectangle is completely within the current clip
* state of the paint engine.
*/
@@ -2952,9 +2953,9 @@ inline bool QRasterPaintEnginePrivate::isUnclipped(const QRectF &rect,
int penWidth) const
{
const QRectF norm = rect.normalized();
- if (norm.left() <= INT_MIN || norm.top() <= INT_MIN
- || norm.right() > INT_MAX || norm.bottom() > INT_MAX
- || norm.width() > INT_MAX || norm.height() > INT_MAX)
+ if (norm.left() <= qreal(INT_MIN) || norm.top() <= qreal(INT_MIN)
+ || norm.right() > qreal(INT_MAX) || norm.bottom() > qreal(INT_MAX)
+ || norm.width() > qreal(INT_MAX) || norm.height() > qreal(INT_MAX))
return false;
return isUnclipped(norm.toAlignedRect(), penWidth);
}
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index cc80641ded9..ab9e7fe312a 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -6,9 +6,11 @@
#include <QtGui/qtguiglobal.h>
#include <QtGui/qtransform.h>
+
#include <QtCore/qglobal.h>
#include <QtCore/qline.h>
#include <QtCore/qlist.h>
+#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 908051a477c..b1ea3f240f1 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -3192,6 +3192,7 @@ static inline bool is_monochrome(const QList<QRgb> &colorTable)
}
/*!
+ * \internal
* Adds an image to the pdf and return the pdf-object id. Returns -1 if adding the image failed.
*/
int QPdfEnginePrivate::addImage(const QImage &img, bool *bitmap, bool lossless, qint64 serial_no)
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index 0d435c95048..08128c30a70 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -145,6 +145,11 @@ static inline qreal adapted_angle_on_x(const QLineF &line)
return QLineF(0, 0, 1, 0).angleTo(line);
}
+/*!
+ \class QStrokerOps
+ \inmodule QtGui
+ \internal
+*/
QStrokerOps::QStrokerOps()
: m_elements(0)
, m_curveThreshold(qt_real_to_fixed(0.25))
@@ -373,6 +378,7 @@ QStroker::LineJoinMode QStroker::joinModeForJoin(Qt::PenJoinStyle joinStyle)
/*!
+ \internal
This function is called to stroke the currently built up
subpath. The subpath is cleared when the function completes.
*/