2012-07-28 23:26:10 +00:00
|
|
|
/*
|
|
|
|
* SkRasterWidget.h
|
|
|
|
*
|
|
|
|
* Created on: Jul 28, 2012
|
|
|
|
* Author: chudy
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SKRASTERWIDGET_H_
|
|
|
|
#define SKRASTERWIDGET_H_
|
|
|
|
|
2013-02-13 13:26:13 +00:00
|
|
|
#if SK_SUPPORT_GPU
|
2012-07-28 23:26:10 +00:00
|
|
|
#include "SkGpuDevice.h"
|
2013-02-13 13:26:13 +00:00
|
|
|
#endif
|
|
|
|
|
2012-07-28 23:26:10 +00:00
|
|
|
#include "SkDevice.h"
|
2012-08-07 16:12:23 +00:00
|
|
|
#include "SkDebugger.h"
|
2012-07-28 23:26:10 +00:00
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QtGui>
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class SkRasterWidget : public QWidget {
|
2012-08-03 17:32:05 +00:00
|
|
|
Q_OBJECT
|
2012-07-28 23:26:10 +00:00
|
|
|
|
|
|
|
public:
|
2012-08-07 16:12:23 +00:00
|
|
|
SkRasterWidget(SkDebugger* debugger);
|
2012-07-28 23:26:10 +00:00
|
|
|
|
|
|
|
~SkRasterWidget();
|
|
|
|
|
2012-08-07 16:12:23 +00:00
|
|
|
void draw() {
|
2012-07-28 23:26:10 +00:00
|
|
|
this->update();
|
|
|
|
}
|
|
|
|
|
2012-08-03 17:32:05 +00:00
|
|
|
signals:
|
|
|
|
void drawComplete();
|
|
|
|
|
2012-07-28 23:26:10 +00:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent* event);
|
|
|
|
|
|
|
|
void resizeEvent(QResizeEvent* event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
SkBitmap fBitmap;
|
2012-08-07 16:12:23 +00:00
|
|
|
SkDebugger* fDebugger;
|
2012-08-01 15:57:52 +00:00
|
|
|
SkCanvas* fCanvas;
|
2012-07-28 23:26:10 +00:00
|
|
|
SkDevice* fDevice;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SKRASTERWIDGET_H_ */
|