|
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 |