summaryrefslogtreecommitdiff
path: root/src/color-map.cpp
diff options
context:
space:
mode:
authorVasile Vilvoiu <vasi@vilvoiu.ro>2021-07-16 21:00:28 +0300
committerVasile Vilvoiu <vasi@vilvoiu.ro>2021-07-16 21:00:28 +0300
commit68e6ebe24cb476997b2ddfc21a5b13fb6f332fa7 (patch)
tree646db708a2db1b61904003c81a05b01358cdb4cc /src/color-map.cpp
parentb13609afcdf66d781db70fb75f6869a052a49079 (diff)
Render texture onto window on each iteration.
Keep colormap in renderer so we don't pass the colormapped windows like animals. Pre-render empty window. Fixes #15.
Diffstat (limited to 'src/color-map.cpp')
-rw-r--r--src/color-map.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/color-map.cpp b/src/color-map.cpp
index a47d98c..d1d199a 100644
--- a/src/color-map.cpp
+++ b/src/color-map.cpp
@@ -124,6 +124,11 @@ InterpolationColorMap::Map(const RealWindow& input) const
return output;
}
+std::unique_ptr<ColorMap> InterpolationColorMap::Copy() const
+{
+ return std::make_unique<InterpolationColorMap>(colors_, values_);
+}
+
TwoColorMap::TwoColorMap(const sf::Color& c1, const sf::Color& c2)
: InterpolationColorMap({ c1, c2 }, { 0.0f, 1.0f })
{