|
From: Ethan M. <merritt@u.washington.edu> - 2009-07-11 21:41:07
|
On Saturday 11 July 2009, Tatsuro MATSUOKA wrote:
> 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
Ugh. I am about ready to give up on this one.
Could you please add a line to Petr's test script:
> set title 'HELLO' tc rgb "blue"
> set style rectangle fs solid 1.0 noborder
> 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
And just to confirm that the right configuration is being tested...
My recent patch is against the current cvs source.
That is, you must undo the original temporary test patch I sent
that commented out a line in win.trm. Please confirm that the
old patch below was removed before your test of the new patch.
>--- gnuplot/term/win.trm 2009-06-07 21:37:29.000000000 -0700
>+++ gnuplot-cvs/term/win.trm 2009-07-09 23:33:55.000000000 -0700
>@@ -621,7 +621,9 @@ WIN_boxfill(
> {
> /* split into two commands to squeeze through all the necessary info
> */ /* Notice HBB 20010208: --> WIN_move() */
>+#if (0) /* Broken! */
> GraphOp(&graphwin, W_fillstyle, style, 0, NULL);
>+#endif
> GraphOp(&graphwin, W_move, xleft, ybottom, NULL);
> GraphOp(&graphwin, W_boxfill, width, height, NULL);
> }
I could wish that we had a more active set of Windows coders among the
current group of gnuplot developers.
Thanks for your patience,
Ethan
> 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/
>
|