×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    11

    Find out which color a specific pixel on the screen has.

    Hello,

    how can i find out which color the pixel e.g. on position x=50 and y=40 on the screen has?

    regards, oe3vsfm4

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    try this:

    CEikonEnv::Static()->ScreenDevice()->GetPixel(MyColor,MyPoint);

    yucca

  3. #3
    Registered User
    Join Date
    Mar 2004
    Posts
    11
    hello, thank you for answering.
    i have an additional question: i want to draw a line on the screen, but only if the pixels where the line would be drawn are white before drawing. how could this be done?
    i hope you could understand my question, otherwise please ask.

    regards, oe3vsfm4

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167
    I quess you could compare the color value of that pixel to KRgbWhite and if it is same then draw your line.

    yucca

  5. #5
    Registered User
    Join Date
    Mar 2004
    Posts
    11
    hello, the problem is that a line is bigger than just one pixel. if the line is horizonal or vertical it is no problem for me to check all the pixels on which the line would be, but what if i draw i line with a 3pixel sized pen from left top to the right bottom of the screen? how can i find out exactly which pixels would be drawn?
    quite complicated to explain but what i basically want is: just draw a line if it would be drawn on white pixels. otherwise drop an error...

    thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×