Skip to content
Commit 84e2ce9d authored by Robert Lancaster's avatar Robert Lancaster Committed by Jasem Mutlaq
Browse files

I found the drawing issue that was making the horizontal bar for different...

I found the drawing issue that was making the horizontal bar for different pixel heights of the window.  It took me some time to dig up what exactly was causing the black line.  But I finally did.

It was a result of clipping that was taking place in Skymapqdraw.cpp:

    // Set Clipping
    QPainterPath path;
    path.addPolygon(m_SkyMap->projector()->clipPoly());
    psky.setClipPath(path);
    psky.setClipping(true);

Which was based upon some code in Projector.cpp in the method void Projector::updateClipPoly()

The issue was that in creating the clip path, it was stepping around the circle from 0 to 180 degrees and then from 0 to -180 degrees.  As a result, it created not a circular clipping region but two semicircular clipping regions.   I painted the path so that I could clearly see what was going on:

Then I tried reversing the direction for the second half circle from -180 to 0.  This did not work, it produced an unbounded clipping region.

But then I tried doing a full circular path from 0 to 360.  This not only gave a circular path, it worked perfectly for the clipping region and fixed the problem.

Now what I don’t know is whether the reason for two separate half circles was based upon some issue with the sincos method accurately calculating the other half of the circle.  The reason I suspect this is because someone went to a lot of trouble to write two separate loops that are nearly identical.

As far as I can tell, this method works, please check for me.

CCMAIL:kstars-devel@kde.org
parent f42e950c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment