Alan W. Irwin wrote: > On 2009-09-28 08:21-0700 Alan W. Irwin wrote: > >> I am pretty sure your conclusion is not correct. The offsets refer to the >> position of the widget on the X root window that corresponds to the physical >> device (monitor or LCD). So you can specify an offset relative to the >> constant root window for _every_ widget on Linux (since it ultimately uses X >> for display). I haven't looked deeper at it, but I assume both the Qt4 and >> cairographics library stacks provide access to this X capability for their >> respective X backends so it will be simply a matter of finding out how >> that is done and using the PLplot offsets appropriately. > > I just tried this idea with revision 10486. A quick look at the Qt4 > documentation seemed to indicate move(ix, iy) was required for this and > should be applied like resize. Therefore, I applied move right after the > existing resize, and the result worked! Note, -dev qtwidget treats negative > offsets as zero (just like -dev xwin), but positive offsets allow you to > position the -dev qtwidget anywhere on the root window. And the implication > of the Qt4 documentation is this method of positioning -dev qtwidget works > for the Quartz (Apple) and Microsoft display backends for Qt4 as well. > > Note, there is no resize currently used in extqt, but I tried something > similar to the (now) existing resize and move for the qtwidgets case, and > there were no build errors or valgrind errors when I ran > examples/c++/qt_example. However, that example was completely oblivious to > PLplot -geometry options (size or offset) so I didn't commit that change. > After all, I am only doing this by rote with no sound fundamental knowledge > about what I should be doing here. Thus, I am leaving it to the Qt4/C++ > experts here to get the -geometry option to work for examples/c++/qt_example > and extqt in general. > > Also, I leave it to the cairo experts here to get offsets to work for xcairo > and extcairo. I hope it will be just as straightforward for them as it > was for me for the -dev qtwidget case.
I'm still puzzled as to why this behavior is desired for extcairo & extqt. Both of these drivers use an externally supplied "context" to render the plot. To me it doesn't seem like a good idea for them to be able to move this context around on the screen and/or inside a window. I believe this should be the job of the program that supplied the context in the first place and that these drivers are doing the right thing by ignoring the -geometry option. If we want qt_example to respect the -geometry option then this should be done by the main qt window and not by the extqt widget attempting to move & resize its parent window. -Hazen ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
