Skip to content

Commit

Permalink
Merge pull request #2758 from sidewayss/master
Browse files Browse the repository at this point in the history
Fix #119721: Rounding error in svggenerator.cpp fixed
  • Loading branch information
lasconic committed Jul 29, 2016
2 parents eb90028 + 8d0c380 commit aeddd33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mscore/svggenerator.cpp
Expand Up @@ -1139,8 +1139,8 @@ void SvgPaintEngine::updateState(const QPaintEngineState &state)
// m11 and m22 have floating point flotsam, for example: 1.000000629
// Both values should be == integer 1, because no scaling is intended.
// So round them to three decimal places, as MuseScore does elsewhere.
const qreal m11 = qRound(t.m11() * 1000) / 1000;
const qreal m22 = qRound(t.m22() * 1000) / 1000;
const qreal m11 = qRound(t.m11() * 1000) / 1000.0;
const qreal m22 = qRound(t.m22() * 1000) / 1000.0;

if (m11 == 1 && m22 == 1 // No scaling
&& t.m12() == t.m21()) { // No rotation, etc.
Expand Down

0 comments on commit aeddd33

Please sign in to comment.