Results 1 to 2 of 2

Thread: getting color from a pixel on canvas

  1. #1
    Join Date
    Jan 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default getting color from a pixel on canvas

    I did not find (maybe it is there) a method to get a pixel's color from the canvas.
    There is a setColorAt but not getColorAt ...

    Is there a way to do so? or if I have a image posted on canvas, there is another
    way to do it? other than getting the pixel from the image object itself.

    Thanks.

    Tee Shift

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: getting color from a pixel on canvas

    Access the image and then use QImage::getPixel().

Similar Threads

  1. When is the best time to delete a QCanvasItem
    By irudkin in forum Qt Programming
    Replies: 12
    Last Post: 8th March 2007, 21:28
  2. showMaximized doesnt show the canvas
    By Kapil in forum Qt Programming
    Replies: 5
    Last Post: 23rd May 2006, 12:22
  3. Setting focus on Canvas
    By Kapil in forum Qt Programming
    Replies: 10
    Last Post: 17th May 2006, 12:55
  4. Canvas problems
    By Tommytrojan in forum Qt Programming
    Replies: 22
    Last Post: 9th May 2006, 16:46
  5. Adding tooltips to canvas items
    By jnana in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2006, 10:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.