Infinite canvas issues
LukasT.dev@gmail.com
lukast.dev at gmail.com
Thu Jul 2 18:24:48 CEST 2009
Today I resolved issue with update rectangle which is moved. It was in
KisCanvas2::updateCanvasProjection(const QRect & rc)
vRect had to be translated by origin
Now the rect is in correct position from the view perspective
There is line
m_d->prescaledProjection->updateCanvasProjection(rc);
which gets rc which is in image coordinates.
in KisPrescaledProjection::updateCanvasProjection(const QRect & rc)
...
// this does not have to be moved I think -- tool calls updateCanvasProjection
// with rc in image coordinates
m_d->projectionCache.updateUnscaledCache( rc );
// this vRect is in view coordinates (widget coordinates I suppose too) and
// probably should be moved by origin
QRect vRect = viewRectFromImagePixels(rc);
if (!vRect.isEmpty()) {
preScale(vRect);
}
...
I will add document origin to prescale projection and test it
If you have anything to say to this, let me know. And I invite you to play
with the updated patch [1] ;)
Thanks
Lukas
[1] http://lukast.mediablog.sk/patches/qpainter_infinite_canvas.2.patch
More information about the kimageshop
mailing list