karbon
vstar.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __VSTAR_H__
00021 #define __VSTAR_H__
00022
00023 #include "vcomposite.h"
00024 #include <koffice_export.h>
00047 class KARBONBASE_EXPORT VStar : public VPath
00048 {
00049 public:
00050 enum VStarType
00051 {
00052 star_outline,
00053 spoke,
00054 wheel,
00055 polygon,
00056 framed_star,
00057 star,
00058 gear
00059 };
00060 VStar( VObject* parent, VState state = edit );
00061 VStar( VObject* parent,
00062 const KoPoint& center, double outerRadius, double innerRadius,
00063 uint edges, double angle = 0.0, uint innerAngle = 0,
00064 double roundness = 0.0, VStarType type = star_outline );
00065
00066 static double getOptimalInnerRadius( uint edges, double outerRadius, uint innerAngle );
00067
00068 virtual QString name() const;
00069
00070
00071 virtual void save( QDomElement& element ) const;
00072 virtual void load( const QDomElement& element );
00073
00074 virtual VPath* clone() const;
00075
00076 protected:
00077 void init();
00078
00079 private:
00080 KoPoint m_center;
00081 double m_outerRadius;
00082 double m_innerRadius;
00083 uint m_edges;
00084 double m_angle;
00085 double m_innerAngle;
00086 double m_roundness;
00087 VStarType m_type;
00088 };
00089
00090 #endif
00091
|