octave-maintainers
[Top][All Lists]
Advanced

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

Re: OS X help needed


From: John W. Eaton
Subject: Re: OS X help needed
Date: Thu, 27 Oct 2016 14:19:03 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 10/27/2016 01:49 PM, Sebastian Schöps wrote:
John W. Eaton wrote
We have the following code to get the number of bits per pixel for the
current display on OS X systems:

[...]

But now I see that the function CGDisplayModeCopyPixelEncoding has been
deprecated for OS X 10.11.  Is there a replacement?  It doesn't have to
be a direct replacement for this function, we just need some way to get
a value for the number of bits per pixel for the display.

jwe

I am not much help w.r.t. GUI programming but are you aware of the
discussion at https://savannah.gnu.org/bugs/?49053 ? or let me ask
differently: could one use qt for this?

Not really, as we still want to be able to get the info for the root figure object even if not using Qt.

But, just to see what Qt provides and how it works, I looked and there is the function

http://doc.qt.io/qt-4.8/qpaintdevice.html#metric

along with an enum value to get the display depth, as well as

http://doc.qt.io/qt-4.8/qpaintdevice.html#depth

to get the display depth directly (I think that's just a wrapper around the metric function). Anyway, for OS X systems, Qt 4.8 simply returns 32 unconditionally, and for Qt 5, it returns 24.

I suppose we could do the same if the functions to get the value from the OS are not available.

jwe




reply via email to

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