]> https://gitweb.dealii.org/ - dealii.git/commitdiff
reverse_grey_scale_color_function
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 24 Aug 2001 14:34:18 +0000 (14:34 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 24 Aug 2001 14:34:18 +0000 (14:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@4911 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/data_out_base.h
deal.II/base/source/data_out_base.all_dimensions.cc
deal.II/doc/news/2001/c-3-1.html

index 1d9ff22c200de11ce38845fa74e053b723657ed0..32840acbdcfa50a4b0abb60efc972462addf9683 100644 (file)
@@ -890,6 +890,24 @@ class DataOutBase
                                                    const double min_value,
                                                    const double max_value);
        
+                                        /**
+                                         * This is one more
+                                         * alternative color function
+                                         * producing a grey scale
+                                         * between white (lowest
+                                         * values) and black (highest
+                                         * values), i.e. the scale is
+                                         * reversed to the previous
+                                         * one. You may use it by
+                                         * setting the
+                                         * @p{color_function}
+                                         * variable to the address of
+                                         * this function.
+                                         */
+       static RgbValues reverse_grey_scale_color_function (const double value,
+                                                           const double min_value,
+                                                           const double max_value);
+       
                                         /**
                                          * Constructor.
                                          */
index 395f2970feae754c6285444215f30385f01626a3..4604412c0b1fb3c9c8a6949e533b50423b6601af 100644 (file)
@@ -222,6 +222,7 @@ DataOutBase::EpsFlags::default_color_function (const double x,
 };
 
 
+
 DataOutBase::EpsFlags::RgbValues
 DataOutBase::EpsFlags::grey_scale_color_function (const double x,
                                                  const double xmin,
@@ -235,6 +236,19 @@ DataOutBase::EpsFlags::grey_scale_color_function (const double x,
 
 
 
+DataOutBase::EpsFlags::RgbValues
+DataOutBase::EpsFlags::reverse_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
+                = 1-(x-xmin)/(xmax-xmin);
+  return rgb_values;
+};
+
+
+
 bool DataOutBase::EpsCell2d::operator < (const EpsCell2d &e) const
 {
                                   // note the "wrong" order in
index ef7d213ef10e08b42af727c2c89b5c4111491ad4..f4963f8afdb3e12903b997323048638945c9b0fc 100644 (file)
@@ -158,6 +158,12 @@ documentation, etc</a>.
 <h3>base</h3>
 
 <ol>
+  <li> <p> 
+       New: Color function <code
+       class="member">DataOutBase::EpsFlags::reverse_grey_scale_color_function</code>.
+       <br>
+       (WB 2001/08/24)
+
   <li> <p> 
        New: Function <code class="member">QProjector::project_to_child</code>
        generates quadrature formulae which act on the area which a
@@ -200,7 +206,6 @@ documentation, etc</a>.
        <br>
        (GK 2001/05/17)
 
-
   <li> <p>
        New: There is now a new <code
        class="class">AutoDerivativeFunction</code> class that

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.