PDA

View Full Version : Zooming QCanvas: QCanvasLine problem



Pieter from Belgium
4th October 2006, 13:29
Hi,

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



QCanvas* canvas = new QCanvas(4000,4000);
QCanvasView* canvasView = new QCanvasView(canvas);
QCanvasLine* line = new QCanvasLine(canvas);
line->setPoints(5,5,3995,3995);
line->show();
canvasView->setWorldMatrix(QWMatrix(canvasView->worldMatrix()).scale(10,10));
canvasView->show();


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

wysota
4th October 2006, 16:58
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).