diff options
author | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2017-01-30 14:48:57 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-01-31 10:17:14 +0000 |
commit | 93c4082f283064dbd8e3028f526a1ca8a102cbf8 (patch) | |
tree | 8d223ca3a49f49cb4b893a2c16d517a0c26b85a7 /src/plugins | |
parent | df10165accff9d2ad67546302ed2e93986f66de1 (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')
-rw-r--r-- | src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp | 3 | ||||
-rw-r--r-- | src/plugins/scenegraph/openvg/qsgopenvginternalrectanglenode.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp b/src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp index 8be2a97034..9cf4184c20 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgglyphnode.cpp @@ -43,6 +43,7 @@ #include "qsgopenvghelpers.h" #include "qsgopenvgfontglyphcache.h" #include "qopenvgoffscreensurface.h" +#include <cmath> QT_BEGIN_NAMESPACE @@ -143,7 +144,7 @@ void QSGOpenVGGlyphNode::render() vgLoadMatrix(transform().constData()); } else { vgLoadIdentity(); - offscreenSurface = new QOpenVGOffscreenSurface(QSize(ceil(m_bounding_rect.width()), ceil(m_bounding_rect.height()))); + offscreenSurface = new QOpenVGOffscreenSurface(QSize(std::ceil(m_bounding_rect.width()), std::ceil(m_bounding_rect.height()))); offscreenSurface->makeCurrent(); } 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(); |