qtgraphics.h 484 B

123456789101112131415161718192021222324252627
  1. #ifndef QTGRAPHICS_H
  2. #define QTGRAPHICS_H
  3. #include <jni.h>
  4. #include <QPainter>
  5. #include <QPaintDevice>
  6. #include <QPen>
  7. #include <QBrush>
  8. class GraphicsPainter : public QPainter
  9. {
  10. public:
  11. QPen *currentPen;
  12. QBrush *currentBrush;
  13. QColor *currentColor;
  14. GraphicsPainter(QPaintDevice *dev) : QPainter( dev )
  15. {
  16. currentPen = new QPen();
  17. currentBrush = new QBrush();
  18. currentColor = new QColor();
  19. }
  20. };
  21. GraphicsPainter *getPainter( JNIEnv *env, jobject obj );
  22. #endif