From c4c6f50b6ae5b9281e872a83602799b73522c24d Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 18 Jan 2016 19:42:20 +0100 Subject: BarChart & Scatterplot: added hints for vertex data upload. * BarChart: additionally, removed hover event handler and added a movement event handler * Scatterplot: changed selected/unselected outline colors; unselected is now black, selected is a really bright blue --- scatterplot.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scatterplot.cpp') diff --git a/scatterplot.cpp b/scatterplot.cpp index 366583b..7f15eaf 100644 --- a/scatterplot.cpp +++ b/scatterplot.cpp @@ -11,8 +11,8 @@ static const qreal GLYPH_OPACITY = 1.0; static const qreal GLYPH_OPACITY_SELECTED = 1.0; -static const QColor GLYPH_OUTLINE_COLOR(225, 225, 225); -static const QColor GLYPH_OUTLINE_COLOR_SELECTED(0, 0, 0); +static const QColor GLYPH_OUTLINE_COLOR(0, 0, 0); +static const QColor GLYPH_OUTLINE_COLOR_SELECTED(20, 255, 225); static const QColor SELECTION_COLOR(128, 128, 128, 96); static const float DEFAULT_GLYPH_SIZE = 8.0f; @@ -194,6 +194,7 @@ QSGNode *Scatterplot::newGlyphTree() for (arma::uword i = 0; i < m_xy.n_rows; i++) { QSGGeometry *glyphOutlineGeometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), vertexCount); glyphOutlineGeometry->setDrawingMode(GL_POLYGON); + glyphOutlineGeometry->setVertexDataPattern(QSGGeometry::DynamicPattern); QSGGeometryNode *glyphOutlineNode = new QSGGeometryNode; glyphOutlineNode->setGeometry(glyphOutlineGeometry); glyphOutlineNode->setFlag(QSGNode::OwnsGeometry); @@ -205,6 +206,7 @@ QSGNode *Scatterplot::newGlyphTree() QSGGeometry *glyphGeometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), vertexCount); glyphGeometry->setDrawingMode(GL_POLYGON); + glyphGeometry->setVertexDataPattern(QSGGeometry::DynamicPattern); QSGGeometryNode *glyphNode = new QSGGeometryNode; glyphNode->setGeometry(glyphGeometry); glyphNode->setFlag(QSGNode::OwnsGeometry); -- cgit v1.2.3