out << std::setprecision (5);
};
+ // check if min and max
+ // values for the color are
+ // actually different. If
+ // that is not the case (such
+ // things happen, for
+ // example, in the very first
+ // time step of a time
+ // dependent problem, if the
+ // initial values are zero),
+ // all values are equal, and
+ // then we can draw
+ // everything in an arbitrary
+ // color. Thus, change one of
+ // the two values arbitrarily
+ if (max_color_value == min_color_value)
+ max_color_value = min_color_value+1;
+
// now we've got all the information
// we need. write the cells.
// note: due to the ordering, we
= (*flags.color_function) (cell->color_value,
min_color_value,
max_color_value);
-
- out << rgb_values.red << ' '
- << rgb_values.green << ' '
- << rgb_values.blue << " s ";
+
+ // write out color
+ if (rgb_values.is_grey())
+ out << rgb_values.red << " sg ";
+ else
+ out << rgb_values.red << ' '
+ << rgb_values.green << ' '
+ << rgb_values.blue << " s ";
}
else
- out << "1 1 1 s ";
+ out << "1 sg ";
out << (cell->vertices[0]-offset) * scale << " m "
<< (cell->vertices[1]-offset) * scale << " l "
<h3>base</h3>
<ol>
+ <li> <p>
+ Fixed: In EPS output, colors were set to invalid values if the
+ values of the field that is used for coloring are all
+ equal. This happens, for example, in the very first time step
+ of time dependent problems, if initial values are zero. The
+ color value now used is arbitrary, but valid.
+ <br>
+ (WB 2002/07/24)
+ </p>
+
+ <li> <p>
+ Changed: To save disk space, color values in EPS output are
+ written as grey scale with only one value instead of three RGB
+ values if the color so represented is actually a grey scale.
+ <br>
+ (WB 2002/07/24)
+ </p>
+
<li> <p>
New: There are now operators to allow multiplication and
division of <code class="class">Tensor</code> objects by scalar