Read-only archive of the All About Symbian forum (2001–2013) · About this archive

gPEEKLINE

1 replies · 1,431 views · Started 07 October 2002

Greetings all,
this is my first posting to this list as I wondered if someone out there had tacked the problem I always seem to have with the gPEEKLINE command.
I've looked at this a couple of times with the PSION S5, but never figured out how it worked.
Now I could use it in a program I'm developing for the 9210, but this complicated function seems to be made worse with the introduction of 4096 colours!
Has anyone figured it out? Do you know how to return the Red, Green, Blue components of the colour of the specified pixel? Any help would be greatly appreciated.

Kind regards
Richard Twyning

Put simply (as far as I can tell), it just doesn't work with colour. gPeekLine can tell the difference between black and white, and even between light and dark to some extent, but the only result you'll be able to get (after working out which part of the array it returns is useful) is a 1 for dark areas, and a 0 for light.

Unless Symbian have done anything special, I can't find any way of reading the colour of a pixel on the screen in OPL - and it would have been really useful for some of the RMRArt code (for making some of the effects happen a bit faster).

Andy