-/**
- * Creates a new painter for the buffer of this widget and returns a
- * pointer to it. The class variable 'painter' also
- * points to that object.
- */
-//'painter' is NOT a class variable!
-//RS_Painter * QG_GraphicView::createPainter()
-PaintInterface * QG_GraphicView::createPainter()
-{
-#if 1
- return NULL;
-#else
-//RS_DEBUG->print(RS_Debug::D_CRITICAL, "QG_GraphicView::createPainter called...");
- RS_DEBUG->print("QG_GraphicView::createPainter begin");
-
- if (lastWidth != getWidth() || lastHeight != getHeight())
- {
- destroyPainter();
-
- if (buffer != NULL)
- {
- delete buffer;
- buffer = NULL;
- }
-
- lastWidth = getWidth();
- lastHeight = getHeight();
- }
-
- if (buffer == NULL)
- {
- //RS_DEBUG->timestamp();
- RS_DEBUG->print("creating buffer: %d,%d", getWidth(), getHeight());
- buffer = new QPixmap(getWidth(), getHeight());
- RS_DEBUG->print("ok");
- }
-
- if (painter == NULL)
- {
- painter = new RS_PainterQt(buffer);
- painter->setDrawingMode(drawingMode);
- ((RS_PainterQt *)painter)->setBackgroundMode(Qt::OpaqueMode);
- ((RS_PainterQt *)painter)->setBackgroundColor(background);
- ((RS_PainterQt *)painter)->eraseRect(0, 0, getWidth(), getHeight());
-
- //RS_DEBUG->timestamp();
- }
-
- RS_DEBUG->print("QG_GraphicView::createPainter end");
-
- return painter;
-#endif
-}
-
-/**
- * Creates a new painter for this widget and returns a
- * pointer to it. The class variable 'painter' also
- * automatically points to that object.
- */
-//RS_Painter * QG_GraphicView::createDirectPainter()
-PaintInterface * QG_GraphicView::createDirectPainter()
-{
-#if 1
- return NULL;
-#else
-//RS_DEBUG->print(RS_Debug::D_CRITICAL, "QG_GraphicView::createDirectPainter called...");
- RS_DEBUG->print("QG_GraphicView::createDirectPainter begin");
-
- destroyPainter();
- painter = new RS_PainterQt(this);
- painter->setDrawingMode(drawingMode);
-
- RS_DEBUG->print("QG_GraphicView::createDirectPainter end");
-
- return painter;
-#endif
-}
-
-/**
- * Deletes the painter.
- */
-void QG_GraphicView::destroyPainter()
-{
-#if 1
- return;
-#else
- RS_DEBUG->print("QG_GraphicView::destroyPainter begin");
-
- if (painter != NULL)
- {
- delete painter;
- painter = NULL;
- }
-
- RS_DEBUG->print("QG_GraphicView::destroyPainter end");
-#endif
-}
-