|
From: Tatsuro M. <tma...@ya...> - 2009-07-11 20:12:21
|
Hello
I have tried your patch
set title 'HELLO' tc rgb "blue"
set object 1 rect from 0,0 to 5,5 fc rgb "blue"
set object 2 rect from -6,-6 to -1,-1 fc lt 3
plot x
=> title is blue, but both rectangles are black and their boarders are red
(red is color of the line of plot x)
After I copy the graph to clip board and paste it to a software
=> title is blue, but the rectangle 1 is blue and its boarder is red,
and the rectangle 2 is black and its boarder is red
Regards
Tatsuro
--- Ethan Merritt wrote:
>
> Sorry, it should be curptr->y
>
> Also I found that the windows terminal is affected by the same bug
> reported last week for the postscript terminal.
>
> Revised patch attached.
>
> > diff -urp gnuplot/term/win.trm gnuplot-cvs/term/win.trm
> --- gnuplot/term/win.trm 2009-06-07 21:37:29.000000000 -0700
> +++ gnuplot-cvs/term/win.trm 2009-07-11 10:14:53.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 -rup gnuplot/src/win/wgraph.c gnuplot-cvs/src/win/wgraph.c
> --- gnuplot/src/win/wgraph.c 2009-03-23 16:12:50.000000000 -0700
> +++ gnuplot-cvs/src/win/wgraph.c 2009-07-11 10:14:56.000000000 -0700
> @@ -1023,10 +1023,14 @@ drawgraph(LPGW lpgw, HDC hdc, LPRECT rec
> idx = 0;
> SelectObject(hdc, pattern_brush[idx]);
> break;
> + case FS_DEFAULT:
> + /* Leave the current color in place */
> + break;
> case FS_EMPTY:
> default:
> - /* style == 0 or unknown --> fill with background color */
> + /* fill with background color */
> SelectObject(hdc, halftone_brush[0]);
> + break;
> }
> /* needs to be fixed for monochrome devices */
> /* FIXME: probably should keep track of text color */
> @@ -1104,12 +1108,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->y == (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/
|