summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/ellipsetool.cpp
authorleseb <leseb>2002-03-27 17:09:29 (UTC)
committer leseb <leseb>2002-03-27 17:09:29 (UTC)
commit4372bb8e59eb4b0d2fa5fba8f6525dc14873f239 (patch) (unidiff)
tree6947938ca5d22d3a373741ba3acfc20e8dd67729 /noncore/graphics/drawpad/ellipsetool.cpp
parentfb056735d9a021787f83c6a791225a7ca70c1eb5 (diff)
downloadopie-4372bb8e59eb4b0d2fa5fba8f6525dc14873f239.zip
opie-4372bb8e59eb4b0d2fa5fba8f6525dc14873f239.tar.gz
opie-4372bb8e59eb4b0d2fa5fba8f6525dc14873f239.tar.bz2
Import/export dialogs, improved new page dialog, new tools, ...
Diffstat (limited to 'noncore/graphics/drawpad/ellipsetool.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/drawpad/ellipsetool.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/ellipsetool.cpp b/noncore/graphics/drawpad/ellipsetool.cpp
new file mode 100644
index 0000000..c3badc3
--- a/dev/null
+++ b/noncore/graphics/drawpad/ellipsetool.cpp
@@ -0,0 +1,45 @@
1/***************************************************************************
2 * *
3 * DrawPad - a drawing program for Opie Environment *
4 * *
5 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> *
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 ***************************************************************************/
13
14#include "ellipsetool.h"
15
16#include "drawpad.h"
17#include "drawpadcanvas.h"
18
19#include <qpainter.h>
20#include <qpixmap.h>
21
22EllipseTool::EllipseTool(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas)
23 : ShapeTool(drawPad, drawPadCanvas)
24{
25}
26
27EllipseTool::~EllipseTool()
28{
29}
30
31void EllipseTool::drawFinalShape(QPainter& p)
32{
33 p.setRasterOp(Qt::NotROP);
34 p.drawRect(QRect(m_polyline[2], m_polyline[0]));
35 p.setPen(m_pDrawPad->pen());
36 p.setRasterOp(Qt::CopyROP);
37 p.drawEllipse(QRect(m_polyline[2], m_polyline[0]));
38}
39
40void EllipseTool::drawTemporaryShape(QPainter& p)
41{
42 p.setRasterOp(Qt::NotROP);
43 p.drawRect(QRect(m_polyline[2], m_polyline[1]));
44 p.drawRect(QRect(m_polyline[2], m_polyline[0]));
45}