#include <annulus.h>
Public Types | |
typedef PapyrusPointer< Annulus > | pointer |
Public Member Functions | |
virtual | ~Annulus () |
Destructor. | |
double | outer_radius () const |
Returns the outer radius of this annulus. | |
void | set_outer_radius (double r) |
Sets the outer radius to r. | |
double | inner_radius () const |
Returns the inner radius of this annulus. | |
void | set_inner_radius (double r) |
Sets the inner radius to r. | |
void | set_radii (double outer, double inner) |
Sets the outer and inner radii. | |
double | start_angle () const |
Sets the start angle of the annulus. | |
double | end_angle () const |
Sets the end angle of the annulus. | |
void | set_angles (double start, double end) |
Set both start and stop angles in a single method. | |
virtual void | draw_shape (Cairo::RefPtr< Cairo::Context > cairo) const |
Draws on the provided context. | |
sigc::signal< void > | signal_outer_radius () |
Signal emitted when the outer radius is changed. | |
sigc::signal< void > | signal_inner_radius () |
Signal emitted when the inner radius is changed. | |
sigc::signal< void > | signal_angle () |
Signal emitted when the start or end angle is changed. | |
PAPYRUS_CLASS_NAME ("Annulus") | |
PAPYRUS_CLONE_METHOD (Annulus) | |
Static Public Member Functions | |
static pointer | create (double outer_radius=1.0, double inner_radius=1.0, double angle_start=0.0, double angle_end=2.0 *M_PI, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates an annulus with the specified start angle, stop angle and radii. | |
static pointer | create (const Glib::ustring &id, double outer_radius=1.0, double inner_radius=0.5, double angle_start=0.0, double angle_end=2.0 *M_PI, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates an a with the specified start angle, stop angle and radius. | |
Protected Member Functions | |
Annulus (const Glib::ustring &id, double outer_radius, double inner_radius, double angle_start, double angle_end, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) | |
Protected Attributes | |
double | m_outer_radius |
The outer radius of the annulus. | |
double | m_inner_radius |
The inner radius of the annulus. | |
double | m_angle_start |
double | m_angle_end |
sigc::signal< void > | m_signal_outer_radius |
Signal emitted when the outer radius is changed. | |
sigc::signal< void > | m_signal_inner_radius |
Signal emitted when the inner radius is changed. | |
sigc::signal< void > | m_signal_angle |
Signal emitted when the start or end angle is changed. |
The arcs of the annulus default to a full circle but can be set to any start/end point.
typedef PapyrusPointer<Annulus> Papyrus::Annulus::pointer |
Reimplemented from Papyrus::Shape.
Papyrus::Annulus::Annulus | ( | const Glib::ustring & | id, | |
double | outer_radius, | |||
double | inner_radius, | |||
double | angle_start, | |||
double | angle_end, | |||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [protected] |
References m_angle_end, and m_angle_start.
Papyrus::Annulus::~Annulus | ( | ) | [virtual] |
Destructor.
Annulus::pointer Papyrus::Annulus::create | ( | const Glib::ustring & | id, | |
double | outer_radius = 1.0 , |
|||
double | inner_radius = 0.5 , |
|||
double | angle_start = 0.0 , |
|||
double | angle_end = 2.0 * M_PI , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Annulus::pointer Papyrus::Annulus::create | ( | double | outer_radius = 1.0 , |
|
double | inner_radius = 1.0 , |
|||
double | angle_start = 0.0 , |
|||
double | angle_end = 2.0 * M_PI , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Creates an annulus with the specified start angle, stop angle and radii.
References PAPYRUS_CREATE.
Referenced by Papyrus::example_annulus().
void Papyrus::Annulus::draw_shape | ( | Cairo::RefPtr< Cairo::Context > | cairo | ) | const [virtual] |
Draws on the provided context.
Implements Papyrus::Shape.
References m_angle_end, m_angle_start, m_inner_radius, and m_outer_radius.
double Papyrus::Annulus::end_angle | ( | ) | const |
double Papyrus::Annulus::inner_radius | ( | ) | const |
double Papyrus::Annulus::outer_radius | ( | ) | const |
Papyrus::Annulus::PAPYRUS_CLASS_NAME | ( | "Annulus" | ) |
Papyrus::Annulus::PAPYRUS_CLONE_METHOD | ( | Annulus | ) |
void Papyrus::Annulus::set_angles | ( | double | start, | |
double | end | |||
) |
Set both start and stop angles in a single method.
References m_angle_end, m_angle_start, m_signal_angle, and Papyrus::Shape::shape_changed().
void Papyrus::Annulus::set_inner_radius | ( | double | r | ) |
Sets the inner radius to r.
References m_inner_radius, m_signal_inner_radius, and Papyrus::Shape::shape_changed().
void Papyrus::Annulus::set_outer_radius | ( | double | r | ) |
Sets the outer radius to r.
References m_outer_radius, m_signal_outer_radius, and Papyrus::Shape::shape_changed().
void Papyrus::Annulus::set_radii | ( | double | outer, | |
double | inner | |||
) |
Sets the outer and inner radii.
References m_inner_radius, m_outer_radius, m_signal_inner_radius, m_signal_outer_radius, and Papyrus::Shape::shape_changed().
sigc::signal< void > Papyrus::Annulus::signal_angle | ( | ) |
sigc::signal< void > Papyrus::Annulus::signal_inner_radius | ( | ) |
sigc::signal< void > Papyrus::Annulus::signal_outer_radius | ( | ) |
double Papyrus::Annulus::start_angle | ( | ) | const |
double Papyrus::Annulus::m_angle_end [protected] |
Referenced by Annulus(), draw_shape(), end_angle(), and set_angles().
double Papyrus::Annulus::m_angle_start [protected] |
Referenced by Annulus(), draw_shape(), set_angles(), and start_angle().
double Papyrus::Annulus::m_inner_radius [protected] |
The inner radius of the annulus.
Referenced by draw_shape(), inner_radius(), set_inner_radius(), and set_radii().
double Papyrus::Annulus::m_outer_radius [protected] |
The outer radius of the annulus.
Referenced by draw_shape(), outer_radius(), set_outer_radius(), and set_radii().
sigc::signal<void> Papyrus::Annulus::m_signal_angle [protected] |
Signal emitted when the start or end angle is changed.
Referenced by set_angles(), and signal_angle().
sigc::signal<void> Papyrus::Annulus::m_signal_inner_radius [protected] |
Signal emitted when the inner radius is changed.
Referenced by set_inner_radius(), set_radii(), and signal_inner_radius().
sigc::signal<void> Papyrus::Annulus::m_signal_outer_radius [protected] |
Signal emitted when the outer radius is changed.
Referenced by set_outer_radius(), set_radii(), and signal_outer_radius().