octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [changeset] Missing ScreenSize & ScreenPixelsPerInch properties


From: John W. Eaton
Subject: Re: [changeset] Missing ScreenSize & ScreenPixelsPerInch properties
Date: Thu, 22 Jan 2009 13:03:11 -0500

On 22-Jan-2009, Ben Abbott wrote:

| The program's output is below.
| 
| 1280x1024 pixels
| 380x310 mm
| 83.9019 resx
| 85.5579 resx
| 84.7299 avg dpi
| 32 bit depth
| 
| I can confirm the numbers are correct as well ... well almost. The physical 
size of my screen is 14.75x11.75 inches.
| 
| >> [1280,1024]./[14.75,11.75]
| ans =
|    86.7797   87.1489
| 
| The manufacturer likes to claim 15x12inches
| 
| >> [1280,1024]./[15,12]
| ans =
|    85.3333   85.3333
| 
| In any event, looks good to me.

OK.

Is it reasonable to assume that all current OS X systems will have
CGDirectDisplay.h and CGDisplayConfiguration.h and these functions?

How should we decide that we are using OS X?  Are there any
preprocessor macros we can depend on?  We currently do this on Windows
systems:

  #if defined (_MSC_VER)
  #define __WIN32__
  #define WIN32
  [...]
  #endif

  /* Define if we expect to have <windows.h>, Sleep, etc. */
  #if defined (__WIN32__) && ! defined (__CYGWIN__)
  #define OCTAVE_USE_WINDOWS_API 1
  #endif

(Does GCC define __WIN32__ and WIN32 automatically?)  I'd like to do
something similar for OS X to define OCTAVE_USE_OS_X_API.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]