void StatisticsObject::drawStatisticsImage(int frameIdx) { // draw statistics (inverse order) for(int i=p_statsTypeList.count()-1; i>=0; i--) { if (!p_statsTypeList[i].render) continue; StatisticsItemList stats = getStatistics(frameIdx, p_statsTypeList[i].typeID); drawStatisticsImage(stats, p_statsTypeList[i]); } }
void statisticSource::drawStatistics(QPixmap *img, int frameIdx) { // draw statistics (inverse order) for (int i = p_statsTypeList.count() - 1; i >= 0; i--) { if (!p_statsTypeList[i].render) continue; StatisticsItemList stat = getStatistics(frameIdx, p_statsTypeList[i].typeID); drawStatisticsImage(img, stat, p_statsTypeList[i]); } p_lastFrameIdx = frameIdx; }
void StatisticsObject::loadImage(int frameIdx) { if (frameIdx==INT_INVALID || frameIdx >= numFrames()) { p_displayImage = QPixmap(); return; } // create empty image QImage tmpImage(internalScaleFactor()*width(), internalScaleFactor()*height(), QImage::Format_ARGB32); tmpImage.fill(qRgba(0, 0, 0, 0)); // clear with transparent color p_displayImage.convertFromImage(tmpImage); // draw statistics drawStatisticsImage(frameIdx); p_lastIdx = frameIdx; }