To Jim and Phil: This is just to help keep you guys informed about where I am headed with regard to default "dpi" (probably that should be called "upi", see below) and length values.
I am just about ready to tackle this topic for our svg device driver today. The length units for SVG files could be essentially anything, but for our svg device we have chosen to use pts (where 1 pt = 1/72 inch), and that proves to be the length unit that is used for the svgqt and svgcairo results as well. Right now in plplotP.h we define // Devices with real world units for sizes. // Define constants with mm units which can be scaled to any real-world unit desired. #define PLPLOT_DEFAULT_MMPI 25.4 //Use A4 (297mm x 210 mm) size as the default for drivers which use "real world" page sizes #define PLPLOT_DEFAULT_WIDTH_MM 297. #define PLPLOT_DEFAULT_HEIGHT_MM 210. // Devices with pixel units for sizes. // Adopt this value as reasonable approximation for typical LCD monitors. #define PLPLOT_DEFAULT_PIXPI 90. // These pixel dimensions correspond to A5 (210mm x 148mm) size if actual pixels per inch was // PLPLOT_DEFAULT_PIXPI. That is, // PLPLOT_DEFAULT_WIDTH_PIX ~ 210 * PLPLOT_DEFAULT_PIXPI/25.4 // PLPLOT_DEFAULT_HEIGHT_PIX ~ 148 * PLPLOT_DEFAULT_PIXPI/25.4 #define PLPLOT_DEFAULT_WIDTH_PIX 744 #define PLPLOT_DEFAULT_HEIGHT_PIX 524 Instead of multiplying the MM values by 72/25.4 within drivers like svg whose length units are pts, I intend instead to simply #define PLPLOT_DEFAULT_PTPI, PLPLOT_DEFAULT_WIDTH_PT, and PLPLOT_DEFAULT_HEIGHT_PT in plplotP.h and use those values in pt devices. It is also becoming pretty clear to me that plsc->xdpi and plsc->ydpi are misnomers since dots per inch normally would refer to pixels only. Thus, I will probably change those to plsc->xupi and plsc->yupi where "upi" stands for units per inch where units could be pixels, pts, mm, or whatever length unit is appropriate to the device. 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 __________________________ ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel