diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-03-31 10:10:03 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-03-31 10:17:27 +0300 |
commit | 25f48fc046bbce83abeeef0a6081de9f5efcd6d7 (patch) | |
tree | a65f608827740fc5a9aa5493547f435dfd18afac /src/datavisualization/utils/utils.cpp | |
parent | fffa26dc1470ad6562e390133314fc149134b8e5 (diff) |
Row/colun selection using axis labels, part 1
Task-number: QTRD-2981
+ Bars done
+ Scatter done (= no label selection)
- Surface to be done
Change-Id: Icd352e40ad6d0ada76380f3dba742f280fd278b3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/utils/utils.cpp')
-rw-r--r-- | src/datavisualization/utils/utils.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/datavisualization/utils/utils.cpp b/src/datavisualization/utils/utils.cpp index 38fa0b2a..eb84f162 100644 --- a/src/datavisualization/utils/utils.cpp +++ b/src/datavisualization/utils/utils.cpp @@ -126,15 +126,14 @@ QImage Utils::printTextToImage(const QFont &font, const QString &text, const QCo return image; } -QVector3D Utils::getSelection(QPoint mousepos, int height) +QVector4D Utils::getSelection(QPoint mousepos, int height) { // This is the only one that works with OpenGL ES 2.0, so we're forced to use it // Item count will be limited to 256*256*256 - GLubyte pixel[4] = {255, 255, 255, 0}; + GLubyte pixel[4] = {255, 255, 255, 255}; glReadPixels(mousepos.x(), height - mousepos.y(), 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, (void *)pixel); - QVector3D selectedColor(pixel[0], pixel[1], pixel[2]); - + QVector4D selectedColor(pixel[0], pixel[1], pixel[2], pixel[3]); return selectedColor; } |