|
From: <tim...@en...> - 2005-10-30 19:33:22
|
Hello ! I am happy to provide an updated patch for the wxWidgets terminal, which = goes, as usually, a little further ! The patch on sourceforge : http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1267434&grou= p_id=3D2055&atid=3D302055 Some screenshots : http://tipote.free.fr/wxt12.png http://tipote.free.fr/wxt13.png http://tipote.free.fr/wxt14.png Changes in this patch : * rendering is done offscreen via the cairo library. This gives to the us= er really good-looking plots thanks to line antialiasing ! And it gives me a more consistent drawing library... Of course, you need = to have cairo installed. It may seem another overhead, but in fact cairo is needed by gtk>2.8. * No longer use the readline thread, do all gnuplot<->term communication = via _waitforinput. It avoids to modify core gnuplot files, the main loop is no longer affect= ed. The patch is now completely safe as far as other terminals are concerned. * implement 'pause mouse' ( not very exciting : * implement 'suspend' ) Bug fixing : * should compile cleanly with a unicode-enabled wxwidgets library * reworked pattern/solid fill, much consistent What is remaining in my 'todo' list ? The following : * I plan to use the pango library to manage text. As you will see, cairo = draws text almost correctly (symbol font is working - in particular), but there are still some alignement problems. Pango will giv= e solid functions to calculate complete text extents. The pango dependency is not a problem under unix, as wxwidgets already de= pends on gtk, which depends on pango and cairo. * I have still not tested under Windows. * clipboard bug (two plots in clipboard) remains I hope you will enjoy these changes and I will be pleased to have your ad= vice. Best regards, Timoth=E9e Lecomte |
|
From: Petr M. <mi...@ph...> - 2005-11-07 17:05:47
|
> I am happy to provide an updated patch for the wxWidgets terminal, which goes, as
> usually, a little further !
It doesn't ./configure:
checking for cairo >= 0.4?0...
./configure: line 13471: syntax error near unexpected token `else'
./configure: line 13471: ` else'
Here is the snapshot:
if test $succeeded = yes; then
else
{ { echo "$as_me:$LINENO: error: Cairo can't be found. The wxWidgets
terminal need it. You can disable this terminal with --disable-wxwidgets."
There should be a command in between "then" and "else".
Ad cairo and pango: they also need package pixman.
All that is OK for the very fresh linuxes (i.e., I will have to upgrade my
SUSE 9.2 boxes), but what about other wx platforms (Mac, Win, OS/2)? Will it
be easy to install all of these dependencies? Cannot be all that done using
the base wxWidgets? From a brief look the cairo is like the wx library, but
it supports less platforms -- isn't this a duplicate?
---
PM
|
|
From: <tim...@en...> - 2005-11-07 23:16:09
|
Petr Mikulik a =E9crit : >> I am happy to provide an updated patch for the wxWidgets terminal,=20 >> which goes, as >> usually, a little further ! > > It doesn't ./configure: > (...) Thanks for the report. It's a line corresponding to a macro coming from=20 pkg-config. I suppose that my version of pkg-config handles it=20 differently. I will add a assign_some_variable_to_something to cope with = it. > Ad cairo and pango: they also need package pixman. As for cairo 1.0 and maybe earlier versions, libpixman has been merged=20 with cairo. Maybe I should ask for cairo>=3D1.0. > > All that is OK for the very fresh linuxes (i.e., I will have to=20 > upgrade my SUSE 9.2 boxes), but what about other wx platforms (Mac,=20 > Win, OS/2)? Will it be easy to install all of these dependencies?=20 > Cannot be all that done using the base wxWidgets? From a brief look=20 > the cairo is like the wx library, but it supports less platforms --=20 > isn't this a duplicate? I have discussed it a little with Bastian Maerkisch off-list, and I will=20 try to explain my thoughts here : I admit that I have taken some time before deciding to use those=20 libraries. It's a choice based on the balance between functionnality and=20 portability. wxWidgets is well designed to design frames, menus, etc. in=20 a cross-platform way, but is lacking some features as far as drawing is=20 concerned. In particular, text alignment is difficult, because gnuplot=20 aks to justify vertically, and it's not easy to achieve without=20 consistent text extents functions. On the other hand, cairo provides=20 perfect drawing routines, with powerful algorythms for antialiasing for=20 instance (I may seem to insistate an anti-aliasing, but it really makes=20 plots more beautiful), and pango is well-suited for text. Moreover, I=20 have convinced myself that pango and cairo are almost as cross-platform=20 as wxWidgets. Cairo aims to be a universal drawing library on a lot of platforms. You=20 can convince yourself if you look at mozilla which already uses cairo to=20 handle svg contents in firefox 1.5. Moreover, at this time, I use cairo=20 in a totally cross-platform way, as I draw to an offscreen buffer, and I=20 let wxWidgets do the remaining work to draw to the screen. So we just=20 have to make cairo compile under targetted platforms... It is working=20 with windows, and google seems to say it's also done already by some=20 people on OS/2. As far as pango is concerned, I am inclined to use it because the text=20 API in cairo is limited, and the doc says it's a "toy". This doc also=20 suggests to use pango. The only platform-dependent code in pango in the=20 way it finds fonts. The rendering is done through cairo directly. Pango=20 is used by gtk+, which is known to work on windows at least (and of=20 course X11). I hope we will be able to make pango also work on OS/2... As far as "freshness" is concerned, you're right to say that linux users=20 may need some time to have cairo (pango has settled for a longer time)=20 in their distributions. However, by the time you - gnuplot main=20 developpers - decide to make an official release, I think there's no=20 need to worry ;-) Since gnome 2.12 which depends on Cairo 1.0 was=20 released a few weeks ago, Cairo will spread much quicker... Well, let's talk with concrete figures/examples about platforms. Three=20 days ago, Bastian Maerkisch succeeded to compile the current patch under=20 windows with msvc, with minor tweaks in my code. On my side, I managed=20 to have a working code with pango (the last sf patch uses cairo only),=20 and it suits my needs. So I have switched to windows too, and since=20 yesterday, I have been able to compile and run my code under MinGW with=20 wxWidgets, Cairo and Pango. It's working pretty well, apart from mousing=20 mode since under windows term->waitforinput doesn't seemed to be used... As a proof ;-), here are screenshots taken from windows XP running the=20 wxWidgets terminal, using Cairo and Pango: (test) http://tipote.free.fr/wxt_windows1.png (pm3d) http://tipote.free.fr/wxt_windows2.png Moreover, here is a zip archive containing gnuplot binary for windows=20 compiled statically with wxWidgets, and dynamically with cairo and=20 pango. Dlls are included so you don't need to add anything : it "should"=20 work out-of-the-box. (3MB zipped archive) http://tipote.free.fr/Gnuplot4.1.zip Please note that there's a bug (hopefully not related to my patch) at=20 least on my box : I have to maximize the gnuplot main window, or it will=20 crash when lauching the wxt terminal. I think it's related to debugging=20 strings that I ask to print to stderr, but I don't understand it clearly.= .. I will appreciate any comment about this scheme. Thank you very much for your interest in my work. Best regards, Timoth=E9e Lecomte |
|
From: Petr M. <mi...@ph...> - 2005-11-11 20:14:29
|
> well-suited for text. Moreover, I have convinced myself that pango and ca= iro=20 > are almost as cross-platform as wxWidgets. Thanks for the description. > As a proof ;-), here are screenshots taken from windows XP running the=20 > wxWidgets terminal, using Cairo and Pango: > > Moreover, here is a zip archive containing gnuplot binary for windows=20 > compiled statically with wxWidgets, and dynamically with cairo and pango.= =20 > Dlls are included so you don't need to add anything : it "should" work=20 > out-of-the-box. > > (3MB zipped archive) http://tipote.free.fr/Gnuplot4.1.zip Please add also libintl.dll. I've added some 2001-12-27, 43=A0786 B, and then tried this new wgnuplot un= der=20 Wine 2005-06-28 (SUSE 9.2). There, the "normal" wgnuplot.exe 4.1 runs with= =20 all features. With wxterminal, there were few problems: - it needs unicode fonts =3D> wine wants Win NT/2K/XP - switched wine to XP, but there are no fonts - "set pm3d; splot x*y" produces a strange surface > apart from mousing mode since under windows term->waitforinput doesn't=20 > seemed to be used... No, do_string() is called directly (both gnuplot and its windows terminal= =20 are in the same binary, contrary to X11 or OS/2 terminals). --- PM |
|
From: <tim...@en...> - 2005-11-11 22:08:03
|
Petr Mikulik wrote: >> well-suited for text. Moreover, I have convinced myself that pango >> and cairo are almost as cross-platform as wxWidgets. > > Thanks for the description. > >> As a proof ;-), here are screenshots taken from windows XP running >> the wxWidgets terminal, using Cairo and Pango: >> >> Moreover, here is a zip archive containing gnuplot binary for windows >> compiled statically with wxWidgets, and dynamically with cairo and >> pango. Dlls are included so you don't need to add anything : it >> "should" work out-of-the-box. >> >> (3MB zipped archive) http://tipote.free.fr/Gnuplot4.1.zip > > > Please add also libintl.dll. I have figured it out too. Will add the version provided by the GnuWin32 project. > I've added some 2001-12-27, 43 786 B, and then tried this new wgnuplot > under Wine 2005-06-28 (SUSE 9.2). There, the "normal" wgnuplot.exe 4.1 > runs with all features. With wxterminal, there were few problems: > - it needs unicode fonts =3D> wine wants Win NT/2K/XP > - switched wine to XP, but there are no fonts Well, it's something that I need to work on. The actual code does only work with a unicode-enabled wxWidgets, because pango wants utf8 strings, and I use wxWidgets conversion routines. So there can be two suspects : pango which may not find well-suited fonts (unicode...), and wxWidgets which fails to convert to utf8. As pango depends on glib, I should maybe use directly glib functions to convert encodings. > - "set pm3d; splot x*y" produces a strange surface What do you mean by "strange surface" ? Are other plot commands working properly ? > >> apart from mousing mode since under windows term->waitforinput >> doesn't seemed to be used... > > > No, do_string() is called directly (both gnuplot and its windows > terminal are in the same binary, contrary to X11 or OS/2 terminals). As waitforinput is set to 0 in the windows terminal table, I can maybe add the use of waitforinput under windows, with a check such as "if (term->waitforinput)" (as it is done under other platforms). What do you think of it ? Timoth=E9e Lecomte |
|
From: Petr M. <mi...@ph...> - 2005-11-11 22:15:33
|
>> - "set pm3d; splot x*y" produces a strange surface > > What do you mean by "strange surface" ? Are other plot commands working > properly ? It is flipped vertically (along a vertical axis). >>> apart from mousing mode since under windows term->waitforinput >>> doesn't seemed to be used... >> >> No, do_string() is called directly (both gnuplot and its windows >> terminal are in the same binary, contrary to X11 or OS/2 terminals). > > As waitforinput is set to 0 in the windows terminal table, I can maybe > add the use of waitforinput under windows, with a check such as "if > (term->waitforinput)" (as it is done under other platforms). What do you > think of it ? I don't (needed to) understand the meaning of term->waitforinput (I considered it an x11 kludge). --- PM |