#include <arc.h>
Public Types | |
typedef PapyrusPointer< Arc > | pointer |
Public Member Functions | |
virtual | ~Arc () |
Destructor. | |
double | radius () const |
Returns the radius of this arc. | |
void | set_radius (double r) |
Sets the radius to r. | |
double | start_angle () const |
Sets the start angle of the arc. | |
double | end_angle () const |
Sets the end angle of the arc. | |
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_radius () |
Signal emitted when the radius is changed. | |
sigc::signal< void > | signal_angle () |
Signal emitted when the start or end angle is changed. | |
PAPYRUS_CLASS_NAME ("Arc") | |
PAPYRUS_CLONE_METHOD (Arc) | |
Static Public Member Functions | |
static pointer | create (double radius=1.0, double angle_start=0.0, double angle_end=M_PI/2.0, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates an arc with the specified start angle, stop angle and radius. | |
static pointer | create (const Glib::ustring &id, double radius=1.0, double angle_start=0.0, double angle_end=M_PI/2.0, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates an arc with the specified start angle, stop angle and radius. | |
Protected Member Functions | |
Arc (const Glib::ustring &id, double radius, double angle_start, double angle_end, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) | |
Protected Attributes | |
double | m_radius |
The radius of the arc. | |
double | m_angle_start |
double | m_angle_end |
sigc::signal< void > | m_signal_radius |
Signal emitted when the radius is changed. | |
sigc::signal< void > | m_signal_angle |
Signal emitted when the start or end angle is changed. |
Arc
typedef PapyrusPointer<Arc> Papyrus::Arc::pointer |
Reimplemented from Papyrus::Shape.
Papyrus::Arc::Arc | ( | const Glib::ustring & | id, | |
double | 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::Arc::~Arc | ( | ) | [virtual] |
Destructor.
Arc::pointer Papyrus::Arc::create | ( | const Glib::ustring & | id, | |
double | radius = 1.0 , |
|||
double | angle_start = 0.0 , |
|||
double | angle_end = M_PI / 2.0 , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Arc::pointer Papyrus::Arc::create | ( | double | radius = 1.0 , |
|
double | angle_start = 0.0 , |
|||
double | angle_end = M_PI / 2.0 , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Creates an arc with the specified start angle, stop angle and radius.
References PAPYRUS_CREATE.
Referenced by Papyrus::example_arc(), Papyrus::example_boxed(), and Papyrus::example_handlebox().
void Papyrus::Arc::draw_shape | ( | Cairo::RefPtr< Cairo::Context > | cairo | ) | const [virtual] |
Draws on the provided context.
Implements Papyrus::Shape.
References m_angle_end, m_angle_start, and m_radius.
double Papyrus::Arc::end_angle | ( | ) | const |
Papyrus::Arc::PAPYRUS_CLASS_NAME | ( | "Arc" | ) |
Papyrus::Arc::PAPYRUS_CLONE_METHOD | ( | Arc | ) |
double Papyrus::Arc::radius | ( | ) | const |
void Papyrus::Arc::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::Arc::set_radius | ( | double | r | ) |
sigc::signal< void > Papyrus::Arc::signal_angle | ( | ) |
sigc::signal< void > Papyrus::Arc::signal_radius | ( | ) |
double Papyrus::Arc::start_angle | ( | ) | const |
double Papyrus::Arc::m_angle_end [protected] |
Referenced by Arc(), draw_shape(), end_angle(), and set_angles().
double Papyrus::Arc::m_angle_start [protected] |
Referenced by Arc(), draw_shape(), set_angles(), and start_angle().
double Papyrus::Arc::m_radius [protected] |
sigc::signal<void> Papyrus::Arc::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::Arc::m_signal_radius [protected] |