Results 1 to 7 of 7

Thread: Qt 4.3.0 clipping problem?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Feb 2007
    Location
    Philadelphia, USA
    Posts
    255
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    43
    Thanked 21 Times in 21 Posts

    Default Re: Qt 4.3.0 clipping problem?

    I would be interested to see the output if you tried the following in place of what you have already tried:

    Qt Code:
    1. QRectF myRect,clipRect;
    2. myRect=( 100, -100, width-200, -(height-200) );
    3. cout << "myRect: left: " << myRect.left() << " right: " << myRect.x() + myRect.width() << " top: " << myRect.top() << " bottom: " << myRect.y() + myRect.height() << endl;
    4. myPainter.setClipRect(myRect, Qt::ReplaceClip);
    5. clipRect = myPainter.clipRegion().boundingRect();
    6. cout << "clipRect: left: " << clipRect.left() << " right: " << clipRect.x() + clipRect.width() << " top: " << clipRect.top() << " bottom: " << clipRect.y() + clipRect.height() << endl;
    7.  
    8. myRect=( 100.001, -100, width-200, -(height-200) );
    9. cout << "myRect: left: " << myRect.left() << " right: " << myRect.x() + myRect.width() << " top: " << myRect.top() << " bottom: " << myRect.y() + myRect.height() << endl;
    10. myPainter.setClipRect(myRect, Qt::ReplaceClip);
    11. clipRect = myPainter.clipRegion().boundingRect();
    12. cout << "clipRect: left: " << clipRect.left() << " right: " << clipRect.x() + clipRect.width() << " top: " << clipRect.top() << " bottom: " << clipRect.y() + clipRect.height() << endl;
    13.  
    14. myRect=( 99, -100, width-200, -(height-200) );
    15. cout << "myRect: left: " << myRect.left() << " right: " << myRect.x() + myRect.width() << " top: " << myRect.top() << " bottom: " << myRect.y() + myRect.height() << endl;
    16. myPainter.setClipRect(myRect, Qt::ReplaceClip);
    17. clipRect = myPainter.clipRegion().boundingRect();
    18. cout << "clipRect: left: " << clipRect.left() << " right: " << clipRect.x() + clipRect.width() << " top: " << clipRect.top() << " bottom: " << clipRect.y() + clipRect.height() << endl;
    19.  
    20. myRect=( 100, -100-(height-200), width-200, +(height-200) );
    21. cout << "myRect: left: " << myRect.left() << " right: " << myRect.x() + myRect.width() << " top: " << myRect.top() << " bottom: " << myRect.y() + myRect.height() << endl;
    22. myPainter.setClipRect(myRect, Qt::ReplaceClip);
    23. clipRect = myPainter.clipRegion().boundingRect();
    24. cout << "clipRect: left: " << clipRect.left() << " right: " << clipRect.x() + clipRect.width() << " top: " << clipRect.top() << " bottom: " << clipRect.y() + clipRect.height() << endl;
    25.  
    26. myRect=( 100.001, -100-(height-200), width-200, +(height-200) );
    27. cout << "myRect: left: " << myRect.left() << " right: " << myRect.x() + myRect.width() << " top: " << myRect.top() << " bottom: " << myRect.y() + myRect.height() << endl;
    28. myPainter.setClipRect(myRect, Qt::ReplaceClip);
    29. clipRect = myPainter.clipRegion().boundingRect();
    30. cout << "clipRect: left: " << clipRect.left() << " right: " << clipRect.x() + clipRect.width() << " top: " << clipRect.top() << " bottom: " << clipRect.y() + clipRect.height() << endl;
    31.  
    32.  
    33. myRect=( 99, -100-(height-200), width-200, +(height-200) );
    34. cout << "myRect: left: " << myRect.left() << " right: " << myRect.x() + myRect.width() << " top: " << myRect.top() << " bottom: " << myRect.y() + myRect.height() << endl;
    35. myPainter.setClipRect(myRect, Qt::ReplaceClip);
    36. clipRect = myPainter.clipRegion().boundingRect();
    37. cout << "clipRect: left: " << clipRect.left() << " right: " << clipRect.x() + clipRect.width() << " top: " << clipRect.top() << " bottom: " << clipRect.y() + clipRect.height() << endl;
    To copy to clipboard, switch view to plain text mode 

    ... perhaps it has something to do with the negative height???

  2. The following user says thank you to magland for this useful post:

    macbeth (13th June 2007)

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 15:57

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.