]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add an alternative color function for eps output.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Aug 1999 15:14:27 +0000 (15:14 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Aug 1999 15:14:27 +0000 (15:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@1662 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/data_out_base.h
deal.II/base/source/data_out_base.all_dimensions.cc

index fb8be00ec841d68dc4ac10cfd9ca5dcdf5109c8c..bbc0fa56ffe3512d3cb0fe8eac95f2fb4a0bed4d 100644 (file)
@@ -576,6 +576,19 @@ class DataOutBase
        static RgbValues default_color_function (const double value,
                                                 const double min_value,
                                                 const double max_value);
+
+                                        /**
+                                         * This is an alternative color
+                                         * function producing a grey scale
+                                         * between black (lowest values)
+                                         * and white (highest values). You
+                                         * may use it by setting the
+                                         * #color_function# variable to the
+                                         * address of this function.
+                                         */
+       static RgbValues grey_scale_color_function (const double value,
+                                                   const double min_value,
+                                                   const double max_value);
        
                                         /**
                                          * Constructor.
index f9a626674490897de9a2b53a6ae002982e443472..926338d5e2cdd46630586bbf3acce356280333eb 100644 (file)
@@ -125,6 +125,19 @@ DataOutBase::EpsFlags::default_color_function (const double x,
 
 
 
+DataOutBase::EpsFlags::RgbValues
+DataOutBase::EpsFlags::grey_scale_color_function (const double x,
+                                                 const double xmin,
+                                                 const double xmax)
+{
+  DataOutBase::EpsFlags::RgbValues rgb_values;
+  rgb_values.red = rgb_values.blue = rgb_values.green
+                = (x-xmin)/(xmax-xmin);
+  return rgb_values;
+};
+
+
+
 bool DataOutBase::EpsCell2d::operator < (const EpsCell2d &e) const
 {
                                   // note the "wrong" order in

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.