diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-04 18:46:27 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-04 18:46:27 +0100 |
commit | 79119a08157aa954b3b2ecd18c8384b80a03970f (patch) | |
tree | db5332566e6a76f74699bb6eaf146005020e8026 /FTNoIR_Tracker_PT | |
parent | 5d51487b70a07f1853f1cbcf84ac5eb635e38bbe (diff) |
draw images directly, without pixmaps
Diffstat (limited to 'FTNoIR_Tracker_PT')
-rw-r--r-- | FTNoIR_Tracker_PT/pt_video_widget.cpp | 2 | ||||
-rw-r--r-- | FTNoIR_Tracker_PT/pt_video_widget.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/FTNoIR_Tracker_PT/pt_video_widget.cpp b/FTNoIR_Tracker_PT/pt_video_widget.cpp index d0fc8d42..5ac002f4 100644 --- a/FTNoIR_Tracker_PT/pt_video_widget.cpp +++ b/FTNoIR_Tracker_PT/pt_video_widget.cpp @@ -57,6 +57,6 @@ void PTVideoWidget::update_and_repaint() data[y * pitch + x * 3 + 2] = elt2.val[0];
}
qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation);
- pixmap = QPixmap::fromImage(qframe);
+ texture = qframe;
update();
}
diff --git a/FTNoIR_Tracker_PT/pt_video_widget.h b/FTNoIR_Tracker_PT/pt_video_widget.h index f5663e47..acff43fb 100644 --- a/FTNoIR_Tracker_PT/pt_video_widget.h +++ b/FTNoIR_Tracker_PT/pt_video_widget.h @@ -40,12 +40,12 @@ protected slots: void paintEvent( QPaintEvent* e ) {
QMutexLocker foo(&mtx);
QPainter painter(this);
- painter.drawPixmap(e->rect(), pixmap, e->rect());
+ painter.drawImage(e->rect(), texture);
}
void update_and_repaint();
private:
QMutex mtx;
- QPixmap pixmap;
+ QImage texture;
QTimer timer;
cv::Mat _frame;
};
|