|
From: Shigeharu T. <sh...@ie...> - 2008-10-09 02:47:46
|
shige 10/09 2008
----------------
On Japanese gnuplot BBS, the following problem was reported:
Line colors of wgnuplot's graph (ex. `test` command) may lack on
another application which recieve it through the clipboard. This
problem arises in wgnuplot-4.2.4 but not 4.2.3.
It seems to be arise from src/win/wgraph.c rev.1.58. In fact,
wgnuplot with wgraph.c of rev.1.57 has no such problem. But I do
not know which code has the problem and how to fix it.
+========================================================+
Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
sh...@ie... TEL(&FAX): +81-257-22-8161
+========================================================+
|
|
From: Bastian M. <bma...@we...> - 2008-10-09 18:33:37
|
Treatment of line colors within the windows terminal is known to be buggy. Currently, nobody is working actively on the windows terminal. I really would want to help, but due to my work load, I just cannot find enough time. Bastian Shigeharu TAKENO schrieb: > shige 10/09 2008 > ---------------- > > On Japanese gnuplot BBS, the following problem was reported: > > Line colors of wgnuplot's graph (ex. `test` command) may lack on > another application which recieve it through the clipboard. This > problem arises in wgnuplot-4.2.4 but not 4.2.3. > > It seems to be arise from src/win/wgraph.c rev.1.58. In fact, > wgnuplot with wgraph.c of rev.1.57 has no such problem. But I do > not know which code has the problem and how to fix it. > > +========================================================+ > Shigeharu TAKENO NIigata Institute of Technology > kashiwazaki,Niigata 945-1195 JAPAN > sh...@ie... TEL(&FAX): +81-257-22-8161 > +========================================================+ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta -- Bastian Märkisch Physikalisches Institut, Universität Heidelberg Philosophenweg 12 69120 Heidelberg Tel.: +49-6221-549239 Fax: +49-6221-549343 |
|
From: Ethan M. <merritt@u.washington.edu> - 2008-10-09 19:52:58
|
On Thursday 09 October 2008 10:58, Bastian Maerkisch wrote: > Treatment of line colors within the windows terminal is known to be buggy. If I understand the report correctly, the problem is not with gnuplot's display of colors. It is instead reporting a problem with the Windows clipboard operation. A bit of Googling suggests that the problem may be because we switched from using CreatePenIndirect() to using ExtCreatePen(). Apparently some versions of Windows have trouble with ExtCreatePen and the clipboard. But I did not find a definitive statement or a recommended alternative. > Currently, nobody is working actively on the windows terminal. I really > would want to help, but due to my work load, I just cannot find enough time. Understood. But it would be useful to know if you can replicate the problem on your Windows machine, and whether switching that one call back to CreatePenIndirect() fixes it. (I realize that would re-introduce other problems, but at least we'd confirm what the issue is). Ethan > > Bastian > > > Shigeharu TAKENO schrieb: > > shige 10/09 2008 > > ---------------- > > > > On Japanese gnuplot BBS, the following problem was reported: > > > > Line colors of wgnuplot's graph (ex. `test` command) may lack on > > another application which recieve it through the clipboard. This > > problem arises in wgnuplot-4.2.4 but not 4.2.3. > > > > It seems to be arise from src/win/wgraph.c rev.1.58. In fact, > > wgnuplot with wgraph.c of rev.1.57 has no such problem. But I do > > not know which code has the problem and how to fix it. > > > > +========================================================+ > > Shigeharu TAKENO NIigata Institute of Technology > > kashiwazaki,Niigata 945-1195 JAPAN > > sh...@ie... TEL(&FAX): +81-257-22-8161 > > +========================================================+ > > -- Ethan A Merritt |
|
From: Shigeharu T. <sh...@ie...> - 2008-10-10 10:36:50
|
shige 10/10 2008 ---------------- Ethan Merritt <merritt@u.washington.edu> wrote: | A bit of Googling suggests that the problem may be because we switched from | using CreatePenIndirect() to using ExtCreatePen(). Apparently some versions | of Windows have trouble with ExtCreatePen and the clipboard. Thank you for your information. The following patch forces wgnuplot to use CreatePenIndirect() if line_width==1. Certainly, the graph by "plot sin(x)" (made by CreatePenIndirect()) can be copied through the clipboard with no problem and the copying of the graph by "plot sin(x) lw 5" (made by ExtCreatePen()) loses the color, at least on my PC (MS-Windows XP). ----- From here ----- --- src/win/wgraph.c.ORG Thu Oct 9 08:23:00 2008 +++ src/win/wgraph.c Fri Oct 10 19:12:10 2008 @@ -939,13 +939,23 @@ if (line_width != 1) cur_penstruct.lopnWidth.x *= line_width; - /* use ExtCreatePeninstead of CreatePen/CreatePenIndirect to support + /* use ExtCreatePen instead of CreatePen/CreatePenIndirect to support * dashed lines if line_width > 1 */ lb.lbStyle = BS_SOLID; lb.lbColor = cur_penstruct.lopnColor; +/* shige */ +#if 0 lpgw->hapen = ExtCreatePen( (line_width==1 ? PS_COSMETIC : PS_GEOMETRIC) | cur_penstruct.lopnStyle | PS_ENDCAP_FLAT | PS_JOIN_BEVEL, cur_penstruct.lopnWidth.x, &lb, 0, 0); +#else + if (line_width==1) + lpgw->hapen = CreatePenIndirect((LOGPEN FAR *) &cur_penstruct); + else + lpgw->hapen = ExtCreatePen( + PS_GEOMETRIC | cur_penstruct.lopnStyle | PS_ENDCAP_FLAT | PS_JOIN_BEVEL, + cur_penstruct.lopnWidth.x, &lb, 0, 0); +#endif DeleteObject(SelectObject(hdc, lpgw->hapen)); SelectObject(hdc, lpgw->colorbrush[cur_pen]); ----- To here ----- +========================================================+ Shigeharu TAKENO NIigata Institute of Technology kashiwazaki,Niigata 945-1195 JAPAN sh...@ie... TEL(&FAX): +81-257-22-8161 +========================================================+ |
|
From: Ethan M. <merritt@u.washington.edu> - 2008-10-10 17:42:47
|
On Friday 10 October 2008 03:32:22 Shigeharu TAKENO wrote: > shige 10/10 2008 > ---------------- > > Ethan Merritt <merritt@u.washington.edu> wrote: > | A bit of Googling suggests that the problem may be because we switched from > | using CreatePenIndirect() to using ExtCreatePen(). Apparently some versions > | of Windows have trouble with ExtCreatePen and the clipboard. > > Thank you for your information. > > The following patch forces wgnuplot to use CreatePenIndirect() if > line_width==1. Certainly, the graph by "plot sin(x)" (made by > CreatePenIndirect()) can be copied through the clipboard with no > problem and the copying of the graph by "plot sin(x) lw 5" > (made by ExtCreatePen()) loses the color, at least on my PC > (MS-Windows XP). OK. Applied to CVS for both 4.2 and 4.3 Does this mean that the clipboard still has a problem with colored lines with linewidth > 1 ? > > ----- From here ----- > --- src/win/wgraph.c.ORG Thu Oct 9 08:23:00 2008 > +++ src/win/wgraph.c Fri Oct 10 19:12:10 2008 > @@ -939,13 +939,23 @@ > if (line_width != 1) > cur_penstruct.lopnWidth.x *= line_width; > > - /* use ExtCreatePeninstead of CreatePen/CreatePenIndirect to support > + /* use ExtCreatePen instead of CreatePen/CreatePenIndirect to support > * dashed lines if line_width > 1 */ > lb.lbStyle = BS_SOLID; > lb.lbColor = cur_penstruct.lopnColor; > +/* shige */ > +#if 0 > lpgw->hapen = ExtCreatePen( > (line_width==1 ? PS_COSMETIC : PS_GEOMETRIC) | cur_penstruct.lopnStyle | PS_ENDCAP_FLAT | PS_JOIN_BEVEL, > cur_penstruct.lopnWidth.x, &lb, 0, 0); > +#else > + if (line_width==1) > + lpgw->hapen = CreatePenIndirect((LOGPEN FAR *) &cur_penstruct); > + else > + lpgw->hapen = ExtCreatePen( > + PS_GEOMETRIC | cur_penstruct.lopnStyle | PS_ENDCAP_FLAT | PS_JOIN_BEVEL, > + cur_penstruct.lopnWidth.x, &lb, 0, 0); > +#endif > DeleteObject(SelectObject(hdc, lpgw->hapen)); > > SelectObject(hdc, lpgw->colorbrush[cur_pen]); > ----- To here ----- > > +========================================================+ > Shigeharu TAKENO NIigata Institute of Technology > kashiwazaki,Niigata 945-1195 JAPAN > sh...@ie... TEL(&FAX): +81-257-22-8161 > +========================================================+ > -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |
|
From: Shigeharu T. <sh...@ie...> - 2008-10-11 08:55:41
|
shige 10/11 2008
----------------
Ethan Merritt <merritt@u.washington.edu> wrote:
| Does this mean that the clipboard still has a problem with
| colored lines with linewidth > 1 ?
Yes, it seems to remain.
+========================================================+
Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
sh...@ie... TEL(&FAX): +81-257-22-8161
+========================================================+
|