Results 1 to 2 of 2

Thread: Zooming QCanvas: QCanvasLine problem

  1. #1
    Join Date
    Jan 2006
    Location
    Genk, Belgium
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Zooming QCanvas: QCanvasLine problem

    Hi,

    When zooming a canvas view holding a canvas with a single canvas line, the line is rendered incorrectly:

    Qt Code:
    1. QCanvas* canvas = new QCanvas(4000,4000);
    2. QCanvasView* canvasView = new QCanvasView(canvas);
    3. QCanvasLine* line = new QCanvasLine(canvas);
    4. line->setPoints(5,5,3995,3995);
    5. line->show();
    6. canvasView->setWorldMatrix(QWMatrix(canvasView->worldMatrix()).scale(10,10));
    7. canvasView->show();
    To copy to clipboard, switch view to plain text mode 

    While the line should be rendered along almost the entire diagonal, only a small upper-left part is rendered. Moreover when scrolling, small artefacts are shown.

    Is there anything that can be done about this?
    [I am using Qt 3.3.3/Linux]

    Pieter

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

    Default Re: Zooming QCanvas: QCanvasLine problem

    You can try upgrading to 3.3.6. The canvas module is known to contain some rendering glitches. Alternatively you can change your program to force whole view redraw everytime you manipulate it (but it'll slow down your application).

Similar Threads

  1. Unable to resize a QCanvas.
    By yellowmat in forum Newbie
    Replies: 2
    Last Post: 21st June 2006, 12:52
  2. Replies: 7
    Last Post: 20th March 2006, 20:03
  3. 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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.