From 864910a1fb753629d2852a91ffae4ebba374358c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 15 Oct 2013 08:52:25 +0200 Subject: fix trackers for qt5 Assorted changes: - make filenames unique, since automoc made a boo-boo - adjust include paths, "QtGui" -> "" - use std::shared_ptr in c++11 mode (thanks Patrick!) - make class names unique, automoc sucks, but saves typing - add a dummy class in one file since moronic automoc thinks every target contains Q_OBJECTS!!! --- ftnoir_tracker_aruco/ar_video_widget.h | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ftnoir_tracker_aruco/ar_video_widget.h (limited to 'ftnoir_tracker_aruco/ar_video_widget.h') diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h new file mode 100644 index 00000000..dd0c16ac --- /dev/null +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -0,0 +1,39 @@ +/* Copyright (c) 2012 Patrick Ruoff + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ + +#ifndef VIDEOWIDGET_H +#define VIDEOWIDGET_H + +#include +#include +#include +#include +#include +#include +#include + +// ---------------------------------------------------------------------------- +class ArucoVideoWidget : public QWidget +{ + Q_OBJECT + +public: + ArucoVideoWidget(QWidget *parent) : QWidget(parent), mtx() { + } + void update_image(unsigned char* frame, int width, int height); +protected slots: + void paintEvent( QPaintEvent* e ) { + QMutexLocker foo(&mtx); + QPainter painter(this); + painter.drawPixmap(e->rect(), pixmap, e->rect()); + } +private: + QMutex mtx; + QPixmap pixmap; +}; + +#endif // VIDEOWIDGET_H -- cgit v1.2.3 From d7d733131d62777481c9a72fee9005dd58cf0c74 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 22 Oct 2013 02:33:11 +0200 Subject: Optimize widget redraw Signed-off-by: Stanislaw Halik --- FTNoIR_Tracker_PT/pt_video_widget.cpp | 35 ++++++++++++++++++++------------ FTNoIR_Tracker_PT/pt_video_widget.h | 4 +++- ftnoir_tracker_aruco/ar_video_widget.cpp | 26 ++++++++++++++++++------ ftnoir_tracker_aruco/ar_video_widget.h | 10 ++++++++- 4 files changed, 54 insertions(+), 21 deletions(-) (limited to 'ftnoir_tracker_aruco/ar_video_widget.h') diff --git a/FTNoIR_Tracker_PT/pt_video_widget.cpp b/FTNoIR_Tracker_PT/pt_video_widget.cpp index 03c42fc7..35a2c42b 100644 --- a/FTNoIR_Tracker_PT/pt_video_widget.cpp +++ b/FTNoIR_Tracker_PT/pt_video_widget.cpp @@ -18,19 +18,7 @@ using namespace std; void PTVideoWidget::update_image(const cv::Mat& frame) { QMutexLocker foo(&mtx); - QImage qframe = QImage(frame.cols, frame.rows, QImage::Format_RGB888); - uchar* data = qframe.bits(); - const int pitch = qframe.bytesPerLine(); - for (int y = 0; y < frame.rows; y++) - for (int x = 0; x < frame.cols; x++) - { - const int pos = 3 * (y*frame.cols + x); - data[y * pitch + x * 3 + 0] = frame.data[pos + 2]; - data[y * pitch + x * 3 + 1] = frame.data[pos + 1]; - data[y * pitch + x * 3 + 2] = frame.data[pos + 0]; - } - qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); - pixmap = QPixmap::fromImage(qframe); + _frame = frame; } // ---------------------------------------------------------------------------- @@ -50,3 +38,24 @@ VideoWidgetDialog::VideoWidgetDialog(QWidget *parent, FrameProvider* provider) setLayout(layout); resize(VIDEO_FRAME_WIDTH, VIDEO_FRAME_HEIGHT); } + +void PTVideoWidget::update_and_repaint() +{ + QMutexLocker foo(&mtx); + if (_frame.empty()) + return; + QImage qframe = QImage(_frame.cols, _frame.rows, QImage::Format_RGB888); + uchar* data = qframe.bits(); + const int pitch = qframe.bytesPerLine(); + for (int y = 0; y < _frame.rows; y++) + for (int x = 0; x < _frame.cols; x++) + { + const int pos = 3 * (y*_frame.cols + x); + data[y * pitch + x * 3 + 0] = _frame.data[pos + 2]; + data[y * pitch + x * 3 + 1] = _frame.data[pos + 1]; + data[y * pitch + x * 3 + 2] = _frame.data[pos + 0]; + } + qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); + pixmap = QPixmap::fromImage(qframe); + update(); +} diff --git a/FTNoIR_Tracker_PT/pt_video_widget.h b/FTNoIR_Tracker_PT/pt_video_widget.h index e67e6d57..f5663e47 100644 --- a/FTNoIR_Tracker_PT/pt_video_widget.h +++ b/FTNoIR_Tracker_PT/pt_video_widget.h @@ -31,7 +31,7 @@ class PTVideoWidget : public QWidget, public FrameObserver public: PTVideoWidget(QWidget *parent, FrameProvider* provider) : QWidget(parent), /* to avoid linker errors */ FrameObserver(provider) { - connect(&timer, SIGNAL(timeout()), this, SLOT(update())); + connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(45); } void update_image(const cv::Mat &frame); @@ -42,10 +42,12 @@ protected slots: QPainter painter(this); painter.drawPixmap(e->rect(), pixmap, e->rect()); } + void update_and_repaint(); private: QMutex mtx; QPixmap pixmap; QTimer timer; + cv::Mat _frame; }; // ---------------------------------------------------------------------------- diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index 6a4572a0..b727679b 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -14,17 +14,31 @@ using namespace std; void ArucoVideoWidget::update_image(unsigned char *frame, int width, int height) { QMutexLocker foo(&mtx); + memcpy(fb, frame, width * height * 3); + this->width = width; + this->height = height; +} + +void ArucoVideoWidget::update_and_repaint() +{ + QMutexLocker foo(&mtx); + if (width*height <= 0) + return; QImage qframe = QImage(width, height, QImage::Format_RGB888); uchar* data = qframe.bits(); const int pitch = qframe.bytesPerLine(); for (int y = 0; y < height; y++) + { + const int part = y*width; for (int x = 0; x < width; x++) { - const int pos = 3 * (y*width + x); - data[y * pitch + x * 3 + 0] = frame[pos + 2]; - data[y * pitch + x * 3 + 1] = frame[pos + 1]; - data[y * pitch + x * 3 + 2] = frame[pos + 0]; + const int pos = 3 * (part + x); + data[y * pitch + x * 3 + 0] = fb[pos + 2]; + data[y * pitch + x * 3 + 1] = fb[pos + 1]; + data[y * pitch + x * 3 + 2] = fb[pos + 0]; } - qframe = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); - pixmap = QPixmap::fromImage(qframe); + } + auto qframe2 = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); + pixmap = QPixmap::fromImage(qframe2); + update(); } diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index dd0c16ac..3a1574cd 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -15,6 +15,7 @@ #include #include #include +#include // ---------------------------------------------------------------------------- class ArucoVideoWidget : public QWidget @@ -22,7 +23,9 @@ class ArucoVideoWidget : public QWidget Q_OBJECT public: - ArucoVideoWidget(QWidget *parent) : QWidget(parent), mtx() { + ArucoVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb{0} { + connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); + timer.start(60); } void update_image(unsigned char* frame, int width, int height); protected slots: @@ -31,9 +34,14 @@ protected slots: QPainter painter(this); painter.drawPixmap(e->rect(), pixmap, e->rect()); } + void update_and_repaint(); + private: QMutex mtx; QPixmap pixmap; + QTimer timer; + char fb[2048*2048*3]; + int width,height; }; #endif // VIDEOWIDGET_H -- cgit v1.2.3 From 1ad91f92226facb3306003f19407f45b727c3973 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 22 Oct 2013 02:51:19 +0200 Subject: hopefully fix msvc2010 build Signed-off-by: Stanislaw Halik --- ftnoir_tracker_aruco/ar_video_widget.h | 2 +- ftnoir_tracker_ht/ht_video_widget.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ftnoir_tracker_aruco/ar_video_widget.h') diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index 3a1574cd..d16cb017 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -23,7 +23,7 @@ class ArucoVideoWidget : public QWidget Q_OBJECT public: - ArucoVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb{0} { + ArucoVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb() { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } diff --git a/ftnoir_tracker_ht/ht_video_widget.h b/ftnoir_tracker_ht/ht_video_widget.h index 78000afa..33f21226 100644 --- a/ftnoir_tracker_ht/ht_video_widget.h +++ b/ftnoir_tracker_ht/ht_video_widget.h @@ -23,7 +23,7 @@ class HTVideoWidget : public QWidget Q_OBJECT public: - HTVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb{0} { + HTVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb() { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } -- cgit v1.2.3 From cc9b496e2de68b983dbc5fde27a1379cc9602a35 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Nov 2013 17:16:46 +0100 Subject: appease -Wreorder Signed-off-by: Stanislaw Halik --- ftnoir_tracker_aruco/ar_video_widget.h | 4 ++-- ftnoir_tracker_ht/ht_video_widget.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ftnoir_tracker_aruco/ar_video_widget.h') diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index d16cb017..e1c7cff8 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -8,7 +8,7 @@ #ifndef VIDEOWIDGET_H #define VIDEOWIDGET_H -#include +#include #include #include #include @@ -23,7 +23,7 @@ class ArucoVideoWidget : public QWidget Q_OBJECT public: - ArucoVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb() { + ArucoVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0) { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } diff --git a/ftnoir_tracker_ht/ht_video_widget.h b/ftnoir_tracker_ht/ht_video_widget.h index 33f21226..3fff395e 100644 --- a/ftnoir_tracker_ht/ht_video_widget.h +++ b/ftnoir_tracker_ht/ht_video_widget.h @@ -23,7 +23,7 @@ class HTVideoWidget : public QWidget Q_OBJECT public: - HTVideoWidget(QWidget *parent) : QWidget(parent), width(0), height(0), fb() { + HTVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0) { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } -- cgit v1.2.3 From ee82f14d1f2bbdc8fd7c0898e0c47494e4e7362d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 7 Nov 2013 17:21:27 +0100 Subject: fix flicker, hopefully fix pitch Signed-off-by: Stanislaw Halik --- ftnoir_tracker_aruco/ar_video_widget.cpp | 24 +++++++++++------------- ftnoir_tracker_aruco/ar_video_widget.h | 8 ++++---- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 6 +++--- 3 files changed, 18 insertions(+), 20 deletions(-) (limited to 'ftnoir_tracker_aruco/ar_video_widget.h') diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index b727679b..149a19ee 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -11,31 +11,29 @@ using namespace std; -void ArucoVideoWidget::update_image(unsigned char *frame, int width, int height) +void ArucoVideoWidget::update_image(const cv::Mat& frame) { QMutexLocker foo(&mtx); - memcpy(fb, frame, width * height * 3); - this->width = width; - this->height = height; + _frame = frame; } void ArucoVideoWidget::update_and_repaint() { QMutexLocker foo(&mtx); - if (width*height <= 0) + if (_frame.cols*_frame.rows <= 0) return; - QImage qframe = QImage(width, height, QImage::Format_RGB888); + QImage qframe = QImage(_frame.cols, _frame.rows, QImage::Format_RGB888); uchar* data = qframe.bits(); const int pitch = qframe.bytesPerLine(); - for (int y = 0; y < height; y++) + for (int y = 0; y < _frame.rows; y++) { - const int part = y*width; - for (int x = 0; x < width; x++) + for (int x = 0; x < _frame.cols; x++) { - const int pos = 3 * (part + x); - data[y * pitch + x * 3 + 0] = fb[pos + 2]; - data[y * pitch + x * 3 + 1] = fb[pos + 1]; - data[y * pitch + x * 3 + 2] = fb[pos + 0]; + const auto& elt = _frame.at(y, x); + const CvScalar elt2 = elt; + data[y * pitch + x * 3 + 0] = elt2.val[2]; + data[y * pitch + x * 3 + 1] = elt2.val[1]; + data[y * pitch + x * 3 + 2] = elt2.val[0]; } } auto qframe2 = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index e1c7cff8..b95d1873 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -16,6 +16,7 @@ #include #include #include +#include // ---------------------------------------------------------------------------- class ArucoVideoWidget : public QWidget @@ -23,11 +24,11 @@ class ArucoVideoWidget : public QWidget Q_OBJECT public: - ArucoVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0) { + ArucoVideoWidget(QWidget *parent) : QWidget(parent) { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } - void update_image(unsigned char* frame, int width, int height); + void update_image(const cv::Mat& frame); protected slots: void paintEvent( QPaintEvent* e ) { QMutexLocker foo(&mtx); @@ -40,8 +41,7 @@ private: QMutex mtx; QPixmap pixmap; QTimer timer; - char fb[2048*2048*3]; - int width,height; + cv::Mat _frame; }; #endif // VIDEOWIDGET_H diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index a918d020..e063be62 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -280,12 +280,12 @@ start: char buf[128]; + frame = color.clone(); + ::sprintf(buf, "Hz: %d", last_fps); cv::putText(frame, buf, cv::Point(10, 32), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(0, 255, 0), scale); ::sprintf(buf, "Jiffies: %ld", (long) (10000 * (time - tm) / freq)); cv::putText(frame, buf, cv::Point(10, 54), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(80, 255, 0), scale); - - frame = color; if (markers.size() == 1 && markers[0].size() == 4) { const aruco::Marker& m = markers.at(0); @@ -362,7 +362,7 @@ start: } if (frame.rows > 0) - videoWidget->update_image(frame.data, frame.cols, frame.rows); + videoWidget->update_image(frame); } } -- cgit v1.2.3 From 79119a08157aa954b3b2ecd18c8384b80a03970f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 4 Dec 2013 18:46:27 +0100 Subject: draw images directly, without pixmaps --- FTNoIR_Tracker_PT/pt_video_widget.cpp | 2 +- FTNoIR_Tracker_PT/pt_video_widget.h | 4 ++-- ftnoir_posewidget/glwidget.cpp | 4 ++-- ftnoir_posewidget/glwidget.h | 2 +- ftnoir_tracker_aruco/ar_video_widget.cpp | 2 +- ftnoir_tracker_aruco/ar_video_widget.h | 4 ++-- ftnoir_tracker_ht/ht_video_widget.cpp | 2 +- ftnoir_tracker_ht/ht_video_widget.h | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'ftnoir_tracker_aruco/ar_video_widget.h') 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; }; diff --git a/ftnoir_posewidget/glwidget.cpp b/ftnoir_posewidget/glwidget.cpp index 71af8a08..93c98c9c 100644 --- a/ftnoir_posewidget/glwidget.cpp +++ b/ftnoir_posewidget/glwidget.cpp @@ -26,7 +26,7 @@ void GLWidget::paintEvent ( QPaintEvent * event ) { QWidget::paintEvent(event); QPainter p(this); project_quad_texture(); - p.drawPixmap(event->rect(), pixmap, event->rect()); + p.drawImage(event->rect(), texture); } void GLWidget::rotateBy(double xAngle, double yAngle, double zAngle) @@ -226,5 +226,5 @@ void GLWidget::project_quad_texture() { } } } - pixmap = QPixmap::fromImage(texture); + this->texture = texture; } diff --git a/ftnoir_posewidget/glwidget.h b/ftnoir_posewidget/glwidget.h index 0bb693c8..c4b2e09d 100644 --- a/ftnoir_posewidget/glwidget.h +++ b/ftnoir_posewidget/glwidget.h @@ -91,7 +91,7 @@ private: double matrix[9]; QImage front; QImage back; - QPixmap pixmap; + QImage texture; }; #endif diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index c452a638..9a089213 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -37,6 +37,6 @@ void ArucoVideoWidget::update_and_repaint() } } auto qframe2 = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); - pixmap = QPixmap::fromImage(qframe2); + texture = qframe2; update(); } diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index b95d1873..e2cf4d9f 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -33,13 +33,13 @@ 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; }; diff --git a/ftnoir_tracker_ht/ht_video_widget.cpp b/ftnoir_tracker_ht/ht_video_widget.cpp index 8ccec997..c6d59b34 100644 --- a/ftnoir_tracker_ht/ht_video_widget.cpp +++ b/ftnoir_tracker_ht/ht_video_widget.cpp @@ -39,6 +39,6 @@ void HTVideoWidget::update_and_repaint() } } auto qframe2 = qframe.scaled(size(), Qt::IgnoreAspectRatio, Qt::FastTransformation); - pixmap = QPixmap::fromImage(qframe2); + texture = qframe2; update(); } diff --git a/ftnoir_tracker_ht/ht_video_widget.h b/ftnoir_tracker_ht/ht_video_widget.h index 3fff395e..cbfe6ddc 100644 --- a/ftnoir_tracker_ht/ht_video_widget.h +++ b/ftnoir_tracker_ht/ht_video_widget.h @@ -32,13 +32,13 @@ 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; char fb[2048*2048*3]; int width,height; -- cgit v1.2.3