21#ifndef kppolygonobject_h
22#define kppolygonobject_h
24#include <tqpointarray.h>
25#include "KoPointArray.h"
33class KPrPolygonObject : public KPr2DObject
37 KPrPolygonObject( 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,
40 bool _checkConcavePolygon, int _cornersValue, int _sharpnessValue );
42 virtual ~KPrPolygonObject() {}
43 virtual DCOPObject* dcopObject();
45 KPrPolygonObject &operator=( const KPrPolygonObject & );
47 virtual void setSize( double _width, double _height );
48 virtual void setSize( const KoSize & _size )
49 { setSize( _size.width(), _size.height() ); }
51 virtual ObjType getType() const { return OT_POLYGON; }
52 virtual TQString getTypeString() const { return i18n( "Polygon" ); }
54 void setCheckConcavePolygon( bool _concavePolygon) { checkConcavePolygon = _concavePolygon; drawPolygon(); }
55 void setCornersValue( int _cornersValue) { cornersValue = _cornersValue; drawPolygon(); }
56 void setSharpnessValue( int _sharpnessValue) { sharpnessValue = _sharpnessValue; drawPolygon(); }
57 bool getCheckConcavePolygon() const { return checkConcavePolygon; }
58 int getCornersValue() const { return cornersValue; }
59 int getSharpnessValue() const { return sharpnessValue; }
61 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 );
66 virtual void flip( bool horizontal );
67 virtual KoSize getRealSize() const;
68 virtual KoPoint getRealOrig() const;
71 virtual const char * getOasisElementName() const;
72 virtual bool saveOasisObjectAttributes( KPOasisSaveContext &sc ) const;
74 virtual void paint( TQPainter *_painter,KoTextZoomHandler*_zoomHandler,
75 int , bool drawingShadow, bool drawContour );
77 void updatePoints( double _fx, double _fy );
82 bool checkConcavePolygon;
|