On 2013-07-05 16:08-0000 Schwartz, Steven J wrote: > Here's the top of the (correct) linux eps: > > %!PS-Adobe-3.0 EPSF-3.0 > %%BoundingBox: 1 0 596 842 > %%Creator: Qt 4.8.2 > %%CreationDate: Fri Jul 5 16:40:03 2013 > %%Orientation: Landscape > ... snip ... > /pageinit { > % 210 *297 mm (landscape) > 90 rotate 1 -1 scale } def > %%EndProlog > > And here's the top of the (incorrect) windows eps: > > %!PS-Adobe-3.0 EPSF-3.0 > %%BoundingBox: 1 0 843 595 > %%Creator: Qt 4.8.4 > %%CreationDate: Fri 5. Jul 15:25:29 2013 > %%Orientation: Landscape > ... snip ... > /pageinit { > % 297 *210 mm (landscape) > 90 rotate 1 -1 scale } def > %%EndProlog
Hi Steve: The above results clearly demonstrate an error in the qt device driver bounding box results generated by PLplot on the Windows platform. Of course, the "art" of any debugging effort is to simplify as much as possible the test showing the bad results so that other developers can quickly and easily reproduce the problem. Here are parts of the PLplot code that may be relevant: software@raven> grep -i bound \ include/qt.h drivers/qt.cpp bindings/qt_gui/plqt.cpp bindings/qt_gui/plqt.cpp: QRectF bounding; bindings/qt_gui/plqt.cpp: bounding = tempPainter.boundingRect( rect, Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextDontClip, text ); bindings/qt_gui/plqt.cpp: double offset = QFontMetrics( tempPainter.font(), &tempPic ).boundingRect( text ).top(); // Distance between the baseline and the top of the bounding box bindings/qt_gui/plqt.cpp: path.addText( QPointF( bounding.left(), bounding.top() - offset ), tempPainter.font(), text ); bindings/qt_gui/plqt.cpp: tempPainter.drawText( rect, Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextDontClip, text, &bounding ); bindings/qt_gui/plqt.cpp: p->drawPicture( (int) ( xOffset + bounding.width() / 2. ), (int) -yOffset, tempPic ); bindings/qt_gui/plqt.cpp: xOffset += bounding.width(); So assuming you want to take this further, comparisons between gdb runs on the Linux version and Windows version might show you that, e.g., tempPainter.boundingRect was returning a different result on the two systems. Which could lead to a simple test case containing a call to Qpainter.boundingRect that you could approach the Qt developers with. If Qpainter.boundingRect is the issue, full documentation of that function occurs at <http://harmattan-dev.nokia.com/docs/library/html/qt4/qpainter.htm>. HTH. 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); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); 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 __________________________ ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel