Results 1 to 9 of 9

Thread: QPainter: painted color (brush) and pixel value (read after the draw) are different?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QPainter: painted color (brush) and pixel value (read after the draw) are differ

    do the values only differ in one bit?
    I am surprised they are at all close!
    QPainter::drawRect() does not fill the rectangle, so position 50,50 (middle of your rect) must be different than the outline which QPainter drew with drawRect() - or am I missing something in your post?
    Last edited by high_flyer; 18th February 2017 at 19:48.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. QPainter above already painted
    By ^NyAw^ in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2014, 19:59
  2. How can I draw with brush on QLabel?
    By suseway in forum Qt Programming
    Replies: 4
    Last Post: 25th October 2010, 21:13
  3. How to read a color of a pixel on a Widget?
    By wringer in forum Newbie
    Replies: 5
    Last Post: 4th December 2009, 06:31
  4. Replies: 5
    Last Post: 20th October 2009, 07:18
  5. How to get pixel color from QPainter ??
    By rameshg87 in forum Qt Programming
    Replies: 1
    Last Post: 10th August 2008, 08:58

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.