annulus.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PAPYRUSANNULUS_H
00021 #define PAPYRUSANNULUS_H
00022
00023 #include <papyrus/shape.h>
00024
00025 namespace Papyrus
00026 {
00027
00035 class Annulus : public Shape
00036 {
00037 protected:
00038
00039 Annulus ( const Glib::ustring& id,
00040 double outer_radius,
00041 double inner_radius,
00042 double angle_start,
00043 double angle_end,
00044 Fill::pointer fill = Fill::pointer(),
00045 Stroke::pointer stroke = Stroke::pointer()
00046 );
00047
00048 public:
00049 PAPYRUS_DRAWABLE(Annulus);
00050
00052 static pointer create ( double outer_radius = 1.0,
00053 double inner_radius = 1.0,
00054 double angle_start = 0.0,
00055 double angle_end = 2.0 * M_PI,
00056 Fill::pointer fill = Fill::pointer(),
00057 Stroke::pointer stroke = Stroke::pointer()
00058 );
00059
00061 static pointer create ( const Glib::ustring& id,
00062 double outer_radius = 1.0,
00063 double inner_radius = 0.5,
00064 double angle_start = 0.0,
00065 double angle_end = 2.0 * M_PI,
00066 Fill::pointer fill = Fill::pointer(),
00067 Stroke::pointer stroke = Stroke::pointer()
00068 );
00069
00071 virtual ~Annulus();
00072
00074 double outer_radius() const;
00075
00077 void set_outer_radius ( double r );
00078
00080 double inner_radius() const;
00081
00083 void set_inner_radius ( double r );
00084
00086 void set_radii( double outer, double inner );
00087
00089 double start_angle() const;
00090
00092 double end_angle() const;
00093
00095 void set_angles ( double start, double end );
00096
00098 virtual void draw_shape ( Context& cairo ) const;
00099
00101 sigc::signal<void> signal_outer_radius();
00102
00104 sigc::signal<void> signal_inner_radius();
00105
00107 sigc::signal<void> signal_angle();
00108
00109 protected:
00110
00112 double m_outer_radius;
00113
00115 double m_inner_radius;
00116
00117 double m_angle_start;
00118
00119 double m_angle_end;
00120
00122 sigc::signal<void> m_signal_outer_radius;
00123
00125 sigc::signal<void> m_signal_inner_radius;
00126
00128 sigc::signal<void> m_signal_angle;
00129
00130 };
00131
00132 }
00133
00134 #endif