1 // rs_staticgraphicview.cpp
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 06/02/2010 Added this text. :-)
15 #include "rs_staticgraphicview.h"
25 //RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, RS_Painter * p): /*painter(p),*/ width(w),
26 RS_StaticGraphicView::RS_StaticGraphicView(int w, int h, PaintInterface * p): /*painter(p),*/ width(w), height(h)
28 setBackground(RS_Color(255, 255, 255));
30 setBorders(5, 5, 5, 5);
36 RS_StaticGraphicView::~RS_StaticGraphicView()
41 * @return width of widget.
43 int RS_StaticGraphicView::getWidth()
49 * @return height of widget.
51 int RS_StaticGraphicView::getHeight()
57 * Creates a new painter for the buffer of this widget and returns a
58 * pointer to it. The class variable 'painter' also
59 * points to that object.
61 //RS_Painter * RS_StaticGraphicView::createPainter()
62 PaintInterface * RS_StaticGraphicView::createPainter()
68 * Creates a new painter for this widget and returns a
69 * pointer to it. The class variable 'painter' also
70 * points to that object.
72 //RS_Painter * RS_StaticGraphicView::createDirectPainter()
73 PaintInterface * RS_StaticGraphicView::createDirectPainter()
75 return createPainter();
79 * Deletes the painter.
81 void RS_StaticGraphicView::destroyPainter()
86 * Handles paint events by redrawing the graphic in this view.
88 void RS_StaticGraphicView::paint()
90 RS_DEBUG->print("RS_StaticGraphicView::paint begin");
92 RS_DEBUG->print("RS_StaticGraphicView::paint end");