From: Alan W. I. <ir...@be...> - 2009-09-18 15:47:45
|
On 2009-09-18 11:10+0200 Werner Smekal wrote: > Hi Mark, > > > On 18.09.2009, at 10:21, Mark de Wever wrote: > >> Hi, >> >> I've been working a bit on the extcairo driver to automatically >> detect the size of the drawing area. (I already have something >> working, but it needs more work before posting it here.) While >> working on it I ran into a question about the geometry parameter. >> >> The attached patch shows the modification I did to try to resize the >> plot area and move the location of its origin in that test. The >> resizing works, but the modification to the origin doesn't. It also >> seems the origin is undocumented in the plplot documentation, so I >> wonder whether it's supposed to work or not. > > AFAIK, should these parameters change the size of the plot area in a > window (and therefore the size of the window) and the position of the > window. At least the xwin driver implemented it that way, and I did > the same for the wxWidgets driver. Other drivers may ignore position > parameters. Hi Mark: I agree the geometry option for the command line wasn't fully documented. I have now updated that (revision 10421). Note, that option or the equivalent plspage command can set xlength, ylength, xoffset, and yoffset. Supplementing what Werner said, we have the following results: software@raven> grep -l '\->[xy]length' drivers/* drivers/aqt.c drivers/cairo.c drivers/cgm.c drivers/gcw.c drivers/gd.c drivers/pbm.c drivers/plmeta.c drivers/ps.c drivers/psttf.cc drivers/qt.cpp drivers/svg.c drivers/tkwin.c drivers/wingcc.c drivers/wxwidgets.cpp drivers/xwin.c drivers/xwinttf.c and software@raven> grep -l '\->[xy]offset' drivers/* drivers/plmeta.c drivers/wingcc.c drivers/wxwidgets.cpp drivers/xwin.c That is, a lot of drivers pay attention to [xy]length set by -geometry or plspage, but relatively few currently pay attention to [xy]offset set with the same means. However, that deficiency should be easy to rectify for, e.g., xcairo and extqcairo, and I would be happy to accept a patch to that effect. I would also be happy to accept a similar patch for qtwidget and extqt. 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 __________________________ |