[Kstars-devel] Problem with coordinate grid at high zoom

James Bowlin bowlin at mindspring.com
Sun Sep 2 21:33:00 CEST 2007


The problem really is in the QT QPainter::drawLine() code.

Contrary to my earlier assumptions, it is incredibly slow when it has
to clip lines to the borders of the window.  By simply increasing the
point density of the coordinate grid by a factor of 4 I was able to
reduce/eliminate the problem at the zoom level I was working at but
(of course) it came back when I increased the zoom level.

I suspect we will have similar problems with all the other children
of LineListIndex.

If this bug in the QT code is going to persist then we can work around
it by clipping all the lines to the screen rectangle ourselves.  This
would be a bit of a mess if we needed to interleave the screen clipping
with the horizon clipping.  But we only need to do the screen clipping
when we are zoomed in and we only need to do the horizon clipping when
we are zoomed out so I can make four more LineListIndex::draw*() routines
that will clip the lines to the screen rectangle but not to the horizon.

I would prefer not to do this if the underlying QT bug is going to get
fixed.


-- 
Peace, James


More information about the Kstars-devel mailing list