|
From: Tatsuro M. <tma...@ya...> - 2009-07-11 15:26:50
|
Hello
The patch did not go well.
The petr's test gave the same results as those indicated by Petr.
I have two question
One is mere mistype
> + else if (curptr-> == (TC_LT << 8)) { /* TC_LT */
else if (curptr->
is to be
else if (curptr->x
?
The other is questionable
> + GraphOp(&graphwin, W_pm3d_setcolor, colorspec->lt, TC_LT << 8, NULL);
Why is the second argument W_pm3d_setcolor ?
Before modification the second argument was W_line_type.
If I wrote the second argument as W_line_type, this give rectangles are black but borders of the
rectangles are blue.
Perhaps the second argument should be set right but I could not find what was correct.
Regards
Tatsuro
--- Ethan Merritt <merritt@u.washington.edu> wrote:
> On Friday 10 July 2009 14:19:23 Ethan Merritt wrote:
>
> > Please try this more complete patch instead of the above quick test.
> > [beware: untested!]
>
> So sorry. I attached the wrong patch.
> Please try this one instead.
>
>
> --
> Ethan A Merritt
> > diff -urp gnuplot/term/win.trm gnuplot-cvs/term/win.trm
> --- gnuplot/term/win.trm 2009-06-08 09:09:47.000000000 -0700
> +++ gnuplot-cvs/term/win.trm 2009-07-10 14:03:46.000000000 -0700
> @@ -595,8 +595,7 @@ WIN_set_color(t_colorspec *colorspec)
> GraphOp(&graphwin, W_pm3d_setcolor, (colorspec->lt) & 0xffff, 0xff00 | ((colorspec->lt >>
> 16) & 0x00ff), NULL);
> break;
> case TC_LT:
> - /* set color only when second parameter to W_line_type equals 1 */
> - GraphOp(&graphwin, W_line_type, colorspec->lt, 1, NULL);
> + GraphOp(&graphwin, W_pm3d_setcolor, colorspec->lt, TC_LT << 8, NULL);
> break;
> }
> WIN_last_linetype = LT_NODRAW;
> diff -urp gnuplot/src/win/wgraph.c gnuplot-cvs/src/win/wgraph.c
> --- gnuplot/src/win/wgraph.c 2009-03-24 09:27:40.000000000 -0700
> +++ gnuplot-cvs/src/win/wgraph.c 2009-07-10 14:09:41.000000000 -0700
> @@ -1104,12 +1104,16 @@ drawgraph(LPGW lpgw, HDC hdc, LPRECT rec
> LOGBRUSH lb;
>
> /* distinguish gray values and RGB colors */
> - if (curptr->y == 0) {
> + if (curptr->y == 0) { /* TC_FRAC */
> rgb255_color rgb255;
> rgb255maxcolors_from_gray(curptr->x / (double)WIN_PAL_COLORS, &rgb255);
> c = RGB(rgb255.r, rgb255.g, rgb255.b);
> }
> - else {
> + else if (curptr-> == (TC_LT << 8)) { /* TC_LT */
> + short pen = (curptr->x < (WORD)(-2)) ? (curptr->x % WGNUMPENS) + 2 : curptr->x + 2;
> + c = lpgw->colorbrush[pen];
> + }
> + else { /* TC_RGB */
> c = RGB(curptr->y & 0xff, (curptr->x >> 8) & 0xff, curptr->x & 0xff);
> }
>
>
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/
|