Hi Alban: The first part of this addressed to you, but there are some comments about the animated octave examples that are addressed to Andrew at the end.
On 2009-08-20 11:50+0100 Rochel, Alban wrote: > Hello all, > Here is a patch for the Qt driver. It fixes a couple of minor bugs, and it also adds the possibility to pass PLplot command line arguments to the qtext driver (embedded widget in a Qt application) and handles flush and clear for the interactive devices. Thanks for this, and thanks to Andrew for committing it. > However, there still are issues with these implementations: > - Command line arguments for the qtext driver: > [...]I believe the only way to fix this other than changing "-bg" into something else in PLplot is to make a deep copy of argv before passing it to the QApplication constructor and passing this copy to plsetqtdev. Thus, it's up to the application developer to handle such matters. You can see this issue with qt_example: > "qt_example -bg FF000" will display a Qt warning message and go on with the default bg colour > "qt_example -cmap0 _whatever_" will work properly It appears from what you have said that there is a way for application developers to get around this issue. If that "deep copy" method is straightforward, would you be willing to implement that for qt_example since that is probably the first place other developers will look for inspiration for their own qt/PLplot GUI's? > - flushing: it works, but example x17c is *slow* (about 30 times slower than xwin on my system!). This is because the Qt driver will replot everything from the last clear() everytime the flush is done. This is linked to the way the driver was designed, and despite my efforts, I haven't found a quick and easy way to fix this. I still plan to fix this, but it will require some redesign. In the meantime, people who wish to use the Qt driver to animate stuff may be happy to use the new "lines_antialiasing" command-line option which allows to (dis/en)able lines antialiasing (enabled by default), which makes the driver about 5 times slower than xwin. For what it is worth, with the default line antialiasing (same as -drvopt lines_antialiasing=1) it is almost exactly 10 times slower here. With -drvopt lines_antialiasing=0 it is roughly two times slower here than -dev xwin. This general trend makes sense since there is a built-in time delay with example 17 which will make the cpu time consumed by the driver less and less important as the cpu power of the hardware increases. Nevertheless a factor of 10 or more is still most annoying for antialiased animation so I had a look at the Qt documentation of repaint at http://doc.trolltech.com/4.4/qwidget.html#repaint. (For the others here, this function is called to deal with plflushes for qtwidget). It appears there are overloaded forms of repaint that allow you to repaint rectangular subregions of the widget. So if plflush is modified to pass a rectangular subregion to the device driver (which all devices would ignore except for qtwidget) then you might get a major increase in speed for the normal case where you are just adding one more x,y value to be plotted for the animation. IOW a small change to the PLplot core here (and I think it would be possible to do that without changing the plflush API) might be better than a complete qt driver redesign. :-) The rest of this is addressed to Andrew as octave maintainer. There a quite a few animated examples associated with octave (i.e., many of the high-level "p" examples as opposed to the standard low-level "x" examples). Joao was still actively working on the "p" examples when he retired as a core PLplot developer, and as far as I know nobody has touched them since. Right now, our ctest tests ignore p1[0124789] and p20 (presumably because they don't yet work properly for -dev psc). It would be great if you would be willing to get all of those working properly both with -dev psc (to give a snapshot at the end of the animation like x17 does now) and also the interactive devices. As I recall in the old days some of those animated examples were quite spectacular with -dev xwin, and it would be great to see them working now with xcairo and eventually with qtwidget as well (once the animation speed issue for qt is fixed). Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel