Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply screen scale to orbit lines too
Browse files Browse the repository at this point in the history
10110111 committed Jan 12, 2025

Verified

This commit was signed with the committer’s verified signature.
1 parent 1637c22 commit 3fe9709
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/modules/Planet.cpp
Original file line number Diff line number Diff line change
@@ -4886,7 +4886,7 @@ void Planet::drawOrbit(const StelCore* core)
const StelProjectorP prj = core->getProjection(StelCore::FrameHeliocentricEclipticJ2000);
KeplerOrbit *keplerOrbit=static_cast<KeplerOrbit*>(orbitPtr);
StelPainter sPainter(prj);
const float ppx = static_cast<float>(sPainter.getProjector()->getDevicePixelsPerPixel());
const float scale = sPainter.getProjector()->getScreenScale();

// Normal transparency mode
sPainter.setBlending(true);
@@ -4938,8 +4938,8 @@ void Planet::drawOrbit(const StelCore* core)
QVarLengthArray<float, 1024> vertexArray;

sPainter.enableClientStates(true, false, false);
if (orbitsThickness>1 || ppx>1.f)
sPainter.setLineWidth(orbitsThickness*ppx);
if (orbitsThickness>1 || scale>1.f)
sPainter.setLineWidth(orbitsThickness*scale);

sPainter.setLineSmooth(true);

@@ -4964,7 +4964,7 @@ void Planet::drawOrbit(const StelCore* core)
sPainter.drawFromArray(StelPainter::LineStrip, vertexArray.size()/2, 0, false);
}
sPainter.enableClientStates(false);
if (orbitsThickness>1 || ppx>1.f)
if (orbitsThickness>1 || scale>1.f)
sPainter.setLineWidth(1);

sPainter.setLineSmooth(false);

0 comments on commit 3fe9709

Please sign in to comment.