MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / PrintValues

Method PrintValues

src/KeyFrame.cpp:481–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481void Keyframe::PrintValues(std::ostream* out) const {
482 // Column widths
483 std::vector<int> w{10, 12, 8, 11, 19};
484
485 *out << std::right << std::setfill(' ') << std::setprecision(4);
486 // Headings
487 *out << "│"
488 << std::setw(w[0]) << "Frame# (X)" << " │"
489 << std::setw(w[1]) << "Y Value" << " │"
490 << std::setw(w[2]) << "Delta Y" << " │ "
491 << std::setw(w[3]) << "Increasing?" << std::right
492 << "│\n";
493 // Divider
494 *out << "├───────────"
495 << "┼─────────────"
496 << "┼─────────"
497 << "┼────────────┤\n";
498
499 for (int64_t i = 1; i <= GetLength(); ++i) {
500 *out << "│"
501 << std::setw(w[0]-2) << std::defaultfloat << i
502 << (Contains(Point(i, 1)) ? " *" : " ") << " │"
503 << std::setw(w[1]) << std::fixed << GetValue(i) << " │"
504 << std::setw(w[2]) << std::defaultfloat << std::showpos
505 << GetDelta(i) << " │ " << std::noshowpos
506 << std::setw(w[3])
507 << (IsIncreasing(i) ? "true" : "false") << std::right << "│\n";
508 }
509 *out << " * = Keyframe point (non-interpolated)\n";
510 *out << std::flush;
511}
512
513
514// Scale all points by a percentage (good for evenly lengthening or shortening an openshot::Keyframe)

Callers 1

KeyFrame.cppFile · 0.80

Calls 1

PointClass · 0.85

Tested by

no test coverage detected