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 --- colormap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'colormap.cpp') diff --git a/colormap.cpp b/colormap.cpp index 3ebf5c8..961f475 100644 --- a/colormap.cpp +++ b/colormap.cpp @@ -129,10 +129,10 @@ void Colormap::setOrientation(Colormap::Orientation orientation) update(); } -void Colormap::setColorScale(const ColorScale &scale) +void Colormap::setColorScale(const ColorScale *scale) { - m_cmap.resize(scale.numColors() * 3); - scale.sample(scale.numColors(), m_cmap.data()); + m_cmap.resize(SAMPLES * 3); + scale->sample(SAMPLES, m_cmap.data()); if (m_orientation == Colormap::Vertical) { reverseCMap(m_cmap); } -- cgit v1.2.3