From 3ce49858c6859fccc2e4d35839c34685348790d1 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Wed, 2 Mar 2016 15:47:24 -0300 Subject: Improvements related to ColorScale and screenshots. * ColorScale: now a pointer whenever needed. main() takes care of updating extents * New class DivergentColorScale: works specifically for divergent scales, always has 3 colors as input: negative values, 0, positive values * ManipulationHandler: ProjectionHistory no longer needed --- voronoisplat.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'voronoisplat.cpp') diff --git a/voronoisplat.cpp b/voronoisplat.cpp index ad553ba..2ae5a1b 100644 --- a/voronoisplat.cpp +++ b/voronoisplat.cpp @@ -79,10 +79,10 @@ void VoronoiSplat::setValues(const arma::vec &values) update(); } -void VoronoiSplat::setColorScale(const ColorScale &scale) +void VoronoiSplat::setColorScale(const ColorScale *scale) { - m_cmap.resize(scale.numColors() * 3); - scale.sample(scale.numColors(), m_cmap.begin()); + m_cmap.resize(SAMPLES * 3); + scale->sample(SAMPLES, m_cmap.begin()); emit colorScaleChanged(scale); setColormapChanged(true); -- cgit v1.2.3