2
* kis_tool_ellipse.h - part of Krayon
4
* Copyright (c) 2000 John Califf <jcaliff@compuzone.net>
5
* Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
6
* Copyright (c) 2004 Clarence Dang <dang@kde.org>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#ifndef __KIS_TOOL_ELLIPSE_H__
24
#define __KIS_TOOL_ELLIPSE_H__
26
#include "kis_tool_shape.h"
34
class KisToolEllipse : public KisToolShape {
36
typedef KisToolShape super;
41
virtual ~KisToolEllipse();
44
// KisCanvasObserver interface
47
virtual void update (KisCanvasSubject *subject);
50
// KisToolPaint interface
53
virtual void setup(KActionCollection *collection);
55
virtual void buttonPress(KisButtonPressEvent *event);
56
virtual void move(KisMoveEvent *event);
57
virtual void buttonRelease(KisButtonReleaseEvent *event);
60
virtual void draw(const KisPoint& start, const KisPoint& stop);
63
KisPoint m_dragCenter;
68
KisImageSP m_currentImage;
72
#include "kis_tool_factory.h"
74
class KisToolEllipseFactory : public KisToolFactory {
75
typedef KisToolFactory super;
77
KisToolEllipseFactory(KActionCollection * ac) : super(ac) {};
78
virtual ~KisToolEllipseFactory(){};
80
virtual KisTool * createTool() {
81
KisTool * t = new KisToolEllipse();
86
virtual KisID id() { return KisID("ellipse", i18n("Ellipse tool")); }
90
#endif //__KIS_TOOL_ELLIPSE_H__