GetPixel

I’m looking for a way to get the PgColor for a given pixel in a window. Is
there a
function that does this? I’ve found a function to get a color from a pixel
in an
image; should I be making use of that somehow?

Hello,

Take a look at the documentation for the PiGetPixel() function.
http://www.qnx.com/developer/docs/qnx_6.1_docs/photon/lib_ref/pi/pigetpixel.
html

I hope this helps.

Regards,
Dave B.


“Michel Royer” <miker@tilcon.com> wrote in message
news:ap1fci$mc8$1@inn.qnx.com

I’m looking for a way to get the PgColor for a given pixel in a window.
Is
there a
function that does this? I’ve found a function to get a color from a
pixel
in an
image; should I be making use of that somehow?

Yes, but…
the piece I’m missing is this: how do I get the PhImage that corresponds
to what’s already on the screen?


Take a look at the documentation for the PiGetPixel() function.
http://www.qnx.com/developer/docs/qnx_6.1_docs/photon/lib_ref/pi/pigetpixel

html

I’m looking for a way to get the PgColor for a given pixel in
a window. Is there a function that does this? I’ve found a
function to get a color from a pixel in an image; should I
be making use of that somehow?

Michel Royer wrote:

Yes, but…
the piece I’m missing is this: how do I get the PhImage that corresponds
to what’s already on the screen?

You can either use PgReadScreen() to get a image of the whole screen.

or you can use Memory Contexts and get a image of your widgets that way.
(Pm*)

/Johan Björk

Take a look at the documentation for the PiGetPixel() function.
http://www.qnx.com/developer/docs/qnx_6.1_docs/photon/lib_ref/pi/pigetpixel

.

html


I’m looking for a way to get the PgColor for a given pixel in
a window. Is there a function that does this? I’ve found a
function to get a color from a pixel in an image; should I
be making use of that somehow?
\

Thanks. PgReadScreen() may work for us.

BTW, there’s a little box in the bottom-right of the Photon screen that
shows
what surrounds the cursor… how is that achieved? By using PgReadScreen?

phearbear wrote in message …

Michel Royer wrote:
Yes, but…
the piece I’m missing is this: how do I get the PhImage that corresponds
to what’s already on the screen?

You can either use PgReadScreen() to get a image of the whole screen.
or you can use Memory Contexts and get a image of your widgets that way.
(Pm*)