|
From: Ethan A M. <merritt@u.washington.edu> - 2006-04-16 22:51:15
|
On Sunday 16 April 2006 03:13 pm, Per Persson wrote:
> >
> > Several other terminals implement colored fill patterns as differing
> > intensity. E.g. (from emf.trm):
> > case FS_PATTERN: /* pattern fill implemented as partial
> > density */
> > fillpar *= 12;
> > /* Fall through to ...*/
> > case FS_SOLID: /* solid fill */
> > if (fillpar >= 0 && fillpar < 100) {
> > double density = (double)fillpar / 100.;
>
> That's how its done in aqua too, but for B/W patterns make sense.
Except that so far as I can tell from the code, aqua is cycling
through different colors rather than cycling the same color
through different fill intensities. If I'm reading that
right, it means that
plot <foo> with boxes lt 1 fillstyle pattern 2
and
plot <foo> with boxes lt 2 fillstyle pattern 1
produce the same output, which is a surprising result.
> > Other: hot keys ("bind" command)
>
> Since it seems to be tied to mousing, I've never implemented it. If
> the actual binding is done in gnuplot core, then it would just be a
> matter of passing key-down events to gnuplot, right?
Yes.
> > It looks like AQUA_set_color is missing TC_LT from
> > its case statement, for example. That is probably a trivial fix, but
> > there may be other places that bits are missing.
>
> Like I said before, I haven't paid close attention lately and I
> probably have missed adding upport for new features.
> Pointers to docs/examples?
Hmm. See equivalent routine in other terminals; pdf.trm seems like
a good example. The demos "rainbow.dem" and "dashcolor.dem" should
give the code a code test. I think what is needed is this (untested) patch
--- gnuplot/term/aquaterm.trm 2006-04-16 14:22:09.000000000 -0700
+++ gnuplot-cvs/term/aquaterm.trm 2006-04-16 15:48:10.000000000 -0700
@@ -625,17 +625,21 @@
AQUA_set_color(t_colorspec *colorspec)
{
rgb_color color;
-
- if (colorspec->type == TC_FRAC)
+
+ if (colorspec->type == TC_LT) {
+ int linetype = colorspec->lt;
+ [adapter takeColorFromColormapEntry:(linetype%CYCLIC_COLORS)+SPECIAL_COLORS];
+ } else if (colorspec->type == TC_FRAC) {
rgb1maxcolors_from_gray(colorspec->value, &color);
- else if (colorspec->type == TC_RGB) {
+ [adapter setColorRed:color.r green:color.g blue:color.b];
+ } else if (colorspec->type == TC_RGB) {
color.r = (double)((colorspec->lt >> 16 ) & 255) / 255.;
color.g = (double)((colorspec->lt >> 8 ) & 255) / 255.;
color.b = (double)(colorspec->lt & 255) / 255.;
+ [adapter setColorRed:color.r green:color.g blue:color.b];
} else
return;
- [adapter setColorRed:color.r green:color.g blue:color.b];
AQUA_LineType = LT_UNDEFINED;
}
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|