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

Function stringForSpotColor

src/fileformats/ocd_file_export.cpp:520–536  ·  view source on GitHub ↗

String 10: spot color

Source from the content-addressed store, hash-verified

518
519/// String 10: spot color
520QString stringForSpotColor(int i, const MapColor& color)
521{
522 const auto& cmyk = color.getCmyk();
523 QString string_10;
524 QTextStream out(&string_10, QIODevice::Append);
525 out << color.getSpotColorName()
526 << "\tn" << i
527 << "\tv1"
528 << fixed << qSetRealNumberPrecision(1)
529 << "\tc" << qRound(cmyk.c * 200)/2.0
530 << "\tm" << qRound(cmyk.m * 200)/2.0
531 << "\ty" << qRound(cmyk.y * 200)/2.0
532 << "\tk" << qRound(cmyk.k * 200)/2.0
533 << "\tf" << color.getScreenFrequency() * 10
534 << "\ta" << color.getScreenAngle();
535 return string_10;
536}
537
538
539

Callers 1

exportSetupMethod · 0.85

Calls 2

getScreenFrequencyMethod · 0.80
getScreenAngleMethod · 0.80

Tested by

no test coverage detected