diff --git a/src/items/ruler.cpp b/src/items/ruler.cpp index 152a78063..4bbe0ba12 100644 --- a/src/items/ruler.cpp +++ b/src/items/ruler.cpp @@ -117,12 +117,9 @@ QString Ruler::makeSvg(double inches) { // get units int units = m_modelPart->localProp("width").toString().contains("cm") ? IndexCm : IndexIn; - QString svg = TextUtils::makeSVGHeader(GraphicsUtils::SVGDPI, GraphicsUtils::StandardFritzingDPI, (inches + offset + offset) * GraphicsUtils::SVGDPI, GraphicsUtils::SVGDPI/2); - int counter; if (units == IndexCm) { - counter = 0; svg += ""; // 1/100 centimeter spacing @@ -191,9 +188,7 @@ QString Ruler::makeSvg(double inches) { double x = (offset + (i / 16.0)) * GraphicsUtils::StandardFritzingDPI; if (i % 16 == 0) { - // I wonder if QT compiler would see that this is just a constant, and not perform the runtime math? - // If not calculating out the value could save some cycles:) - h = 0.196875;//.125 + (1.15 / 16); + h = .125 + (1.15 / 16); double y = (GraphicsUtils::StandardFritzingDPI/4)+35;//(h + .101) * GraphicsUtils::StandardFritzingDPI; svg += QString("%3") @@ -205,10 +200,10 @@ QString Ruler::makeSvg(double inches) { } } else if (i % 8 == 0) { - h = 0.17812;//.125 + (.85 / 16); + h = .125 + (.85 / 16); } else if (i % 4 == 0) { - h = 0.14062;//.125 + (.25 / 16); + h = .125 + (.25 / 16); } svg += QString("\n")