MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / stringForViewPar

Function stringForViewPar

src/fileformats/ocd_file_export.cpp:541–565  ·  view source on GitHub ↗

String 1030: view

Source from the content-addressed store, hash-verified

539
540/// String 1030: view
541QString stringForViewPar(const MapView& view, const MapCoord& area_offset, quint16 version)
542{
543 QString string_1030;
544 QTextStream out(&string_1030, QIODevice::Append);
545 if (version == 8)
546 {
547 out << "\ts0\tt1";
548 }
549 else
550 {
551 const auto center = view.center() - area_offset;
552 out << qSetRealNumberPrecision(6)
553 << "\tx" << center.x()
554 << "\ty" << -center.y()
555 << "\tz" << view.getZoom()
556 << "\tv0"
557 << "\tm50"
558 << "\tt50"
559 << "\tb50"
560 << "\tc50"
561 << "\th0"
562 << "\td0";
563 }
564 return string_1030;
565}
566
567} // namespace
568

Callers 1

exportSetupMethod · 0.85

Calls 4

centerMethod · 0.80
xMethod · 0.80
yMethod · 0.80
getZoomMethod · 0.80

Tested by

no test coverage detected