aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@qt.io>2017-01-30 14:48:57 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-01-31 10:17:14 +0000
commit93c4082f283064dbd8e3028f526a1ca8a102cbf8 (patch)
tree8d223ca3a49f49cb4b893a2c16d517a0c26b85a7 /src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
parentdf10165accff9d2ad67546302ed2e93986f66de1 (diff)
Fix a compilation issue
src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp: In member function ‘virtual void QSGOpenVGGlyphNode::render()’: src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp:146:90: error: ‘ceil’ was not declared in this scope offscreenSurface = new QOpenVGOffscreenSurface(QSize(ceil(m_bounding_rect.width()), ceil(m_bounding_rect.height()))); src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp: In member function ‘virtual void QSGOpenVGGlyphNode::render()’: src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp:146:90: error: ‘ceil’ was not declared in this scope offscreenSurface = new QOpenVGOffscreenSurface(QSize(ceil(m_bounding_rect.width()), ceil(m_bounding_rect.height()))); Change-Id: I9993d9629d70eb6031b91c3827e3e2d79b0e1ffc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp')
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp b/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
index be437303bc..0bd51cbf46 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp
@@ -39,7 +39,7 @@
#include "qsgopenvginternalrectanglenode.h"
#include "qsgopenvghelpers.h"
-
+#include <cmath>
#include <VG/vgu.h>
QSGOpenVGInternalRectangleNode::QSGOpenVGInternalRectangleNode()
@@ -207,9 +207,9 @@ void QSGOpenVGInternalRectangleNode::render()
vgLoadIdentity();
if (m_radius > 0) {
// Fallback to rendering to an image for rounded rects with perspective transforms
- if (m_offscreenSurface == nullptr || m_offscreenSurface->size() != QSize(ceil(m_rect.width()), ceil(m_rect.height()))) {
+ if (m_offscreenSurface == nullptr || m_offscreenSurface->size() != QSize(std::ceil(m_rect.width()), std::ceil(m_rect.height()))) {
delete m_offscreenSurface;
- m_offscreenSurface = new QOpenVGOffscreenSurface(QSize(ceil(m_rect.width()), ceil(m_rect.height())));
+ m_offscreenSurface = new QOpenVGOffscreenSurface(QSize(std::ceil(m_rect.width()), std::ceil(m_rect.height())));
}
m_offscreenSurface->makeCurrent();