MCPcopy Create free account
hub / github.com/Tencent/libpag / getTotalFrame

Method getTotalFrame

viewer/src/rendering/PAGView.cpp:109–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109QString PAGView::getTotalFrame() const {
110 if (pagFile == nullptr) {
111 return "0";
112 }
113 int64_t totalFrames =
114 static_cast<int64_t>(std::round(getDuration().toLongLong() * pagFile->frameRate() / 1000.0));
115 if (totalFrames < 1) {
116 totalFrames = 0;
117 }
118 return QString::number(totalFrames);
119}
120
121QString PAGView::getCurrentFrame() const {
122 int64_t totalFrames = getTotalFrame().toLongLong();

Callers 1

flushMethod · 0.45

Calls 1

frameRateMethod · 0.45

Tested by

no test coverage detected