getTenthsFromInches() and 144dpi resolution in XML - obsolete?

• Dec 4, 2018 - 14:45

The function getTenthsFromInches() converts from inches to points at 144dpi for XML storage. But the values aren't stored at 144dpi anymore in 3.0, they are stored in inches.

The function is only called from exportxml.cpp:
Z:\MuseScore\mscore\exportxml.cpp(331): double getTenthsFromInches(double) const;
Z:\MuseScore\mscore\exportxml.cpp(1242): const double h = getTenthsFromInches(_score->styleD(Sid::pageHeight));
Z:\MuseScore\mscore\exportxml.cpp(1243): const double w = getTenthsFromInches(_score->styleD(Sid::pageWidth));
Z:\MuseScore\mscore\exportxml.cpp(1244): const double lm = getTenthsFromInches(_score->styleD(Sid::pageOddLeftMargin));
Z:\MuseScore\mscore\exportxml.cpp(1245): const double rm = getTenthsFromInches(_score->styleD(Sid::pagePrintableWidth) - _score->styleD(Sid::pageOddLeftMargin));
Z:\MuseScore\mscore\exportxml.cpp(1246): //const double tm = getTenthsFromInches(pf->oddTopMargin());
Z:\MuseScore\mscore\exportxml.cpp(1247): const double bm = getTenthsFromInches(_score->styleD(Sid::pageOddBottomMargin));
Z:\MuseScore\mscore\exportxml.cpp(2672): const double pageHeight = expMxml->getTenthsFromInches(expMxml->score()->styleD(Sid::pageHeight));
Z:\MuseScore\mscore\exportxml.cpp(4665): const double pageWidth = getTenthsFromInches(score()->styleD(Sid::pageWidth));
Z:\MuseScore\mscore\exportxml.cpp(4666): const double lm = getTenthsFromInches(score()->styleD(Sid::pageOddLeftMargin));
Z:\MuseScore\mscore\exportxml.cpp(4667): const double rm = getTenthsFromInches(score()->styleD(Sid::pageWidth)
Z:\MuseScore\mscore\exportxml.cpp(4669): const double tm = getTenthsFromInches(score()->styleD(Sid::pageOddTopMargin));
Z:\MuseScore\mscore\exportxml.cpp(5447):double ExportMusicXml::getTenthsFromInches(double inches) const

But I don't think it's actually called at run time, because the units are never stored that way. Is all of this code obsolete now? Or is it still used somewhere?


Comments

Do you still have an unanswered question? Please log in first to post your question.