[changeset] Missing ScreenSize & ScreenPixelsPerInch properties

John W. Eaton jwe at octave.org
Wed Jan 21 20:56:23 CST 2009


On 13-Nov-2008, Ben Abbott wrote:

| This changeset adds the properties "screensize" and  
| "screenpixelsperinch" to the root object.
| 
| To set the property values local to my machine I've added the lines  
| below to my ~/.octaverc
| 
| 	set (0, "screensize", [1 1 1440 900])
| 	set (0, "screenpixelsperinch", 74.951])
| 
| Those value correspond to my Mac PowerBook. The defaults should  
| probably be;
| 
| 	set (0, "screensize", [1 1 1024 768])
| 	set (0, "screenpixelsperinch", 72])

I checked in the two patches

  http://hg.savannah.gnu.org/hgweb/octave/rev/66165de2cc42
  http://hg.savannah.gnu.org/hgweb/octave/rev/5cc594679cdc

so that Octave will now get values for these properties from the
system if it is using X11.  But I don't know how to do the same for
Windows or OS X (without X11).  So it would be helpful if someone who
does know could submit a changeset to add the appropriate code in the
new display_info::init function.

On my system, X11 returns slightly different values for the X
and Y dimensions in millimeters, so the computed pixels per inch in
each direction is different.  I average the two to come up with a
single value (94.514 on my system).  But I'm not sure that this is the
correct thing.  Comments?

I also added the screendepth property.

jwe


More information about the Octave-maintainers mailing list