kpresenter

KPrClosedLineObject.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 Toshitaka Fujioka <fujioka@kde.org>
3 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef kpclosedlineoject_h
22#define kpclosedlineoject_h
23
24#include <tqpointarray.h>
25#include "KoPointArray.h"
26#include "KPrObject.h"
27
28class KPrGradient;
29class TQPainter;
30class DCOPObject;
31class KPrPointObject;
32
33class KPrClosedLineObject : public KPr2DObject
34{
35public:
36 KPrClosedLineObject();
37 KPrClosedLineObject( const KoPointArray &_points, const KoSize &_size, const KoPen &_pen, const TQBrush &_brush,
38 FillType _fillType, const TQColor &_gColor1, const TQColor &_gColor2, BCType _gType,
39 bool _unbalanced, int _xfactor, int _yfactor, const TQString _type );
48 KPrClosedLineObject( const KPrPointObject &object );
49
50 virtual ~KPrClosedLineObject() {}
51 //virtual DCOPObject* dcopObject();
52
53 KPrClosedLineObject &operator=( const KPrClosedLineObject & );
54
55 virtual void setSize( double _width, double _height );
56 virtual void setSize( const KoSize & _size ) { setSize( _size.width(), _size.height() ); }
57
58 virtual ObjType getType() const { return OT_CLOSED_LINE; }
59 virtual TQString getTypeString() const { return typeString; }
60
61
62 virtual TQDomDocumentFragment save( TQDomDocument& doc, double offset );
63 virtual double load( const TQDomElement &element );
64 virtual void loadOasis( const TQDomElement &element, KoOasisContext & context, KPrLoadingInfo *info );
65
66 virtual void flip(bool horizontal );
67 virtual KoSize getRealSize() const;
68 virtual KoPoint getRealOrig() const;
69
70protected:
71 virtual const char * getOasisElementName() const;
72 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
73 virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler,
74 int /* pageNum */, bool drawingShadow, bool drawContour );
75
76 void updatePoints( double _fx, double _fy );
77
78 KoPointArray points;
79
80 TQString typeString;
81};
82
83#endif
Class: KPrGradient.
Definition KPrGradient.h:40