A circle is drawn centered on the x,y coordinate with a specified radius. More...
#include <circle.h>
Public Member Functions | |
PAPYRUS_DRAWABLE (Circle) | |
virtual | ~Circle () |
virtual void | set (const AttributeValueMap &avmap) |
double | radius () const |
Returns the radius of this arc. | |
void | set_radius (double r) |
Sets the radius to r. | |
sigc::signal< void > | signal_radius () |
Signal emitted when the radius is changed. | |
virtual void | draw_shape (Context &cairo) const |
Draws on the provided context. | |
virtual Glib::ustring | svg (unsigned depth=0) |
Static Public Member Functions | |
static Circle::pointer | create (double radius=1.0, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates a circle with the specified radius. | |
static Circle::pointer | create (const Glib::ustring &id, double radius=1.0, Fill::pointer fill=Fill::pointer(), Stroke::pointer stroke=Stroke::pointer()) |
Creates a circle with the specified radius. | |
static Circle::pointer | create (const AttributeValueMap &avmap) |
Protected Member Functions | |
Circle (const Glib::ustring &id, double radius, Fill::pointer fill, Stroke::pointer stroke) | |
Circle (const AttributeValueMap &avmap) | |
virtual Region | calculate_extents (const Matrix &m=Matrix::Identity, ExtentsPerformance ep=EXTENTS_QUICK) const |
Reimplments the extent calculation to optimize quick extents without rendering to the sidebuffer. | |
Protected Attributes | |
double | m_radius |
The radius of the arc. | |
sigc::signal< void > | m_signal_radius |
Signal emitted when the radius is changed. |
A circle is drawn centered on the x,y coordinate with a specified radius.
The circle class is a very thin interface for a 360' arc, and doesn't actually extend the arc in any meaningful way, but is provided for convenience and notation.
Circle
Papyrus::Circle::Circle | ( | const Glib::ustring & | id, | |
double | radius, | |||
Fill::pointer | fill, | |||
Stroke::pointer | stroke | |||
) | [protected] |
Referenced by create().
Papyrus::Circle::Circle | ( | const AttributeValueMap & | avmap | ) | [protected] |
Papyrus::Circle::~Circle | ( | ) | [virtual] |
Region Papyrus::Circle::calculate_extents | ( | const Matrix & | m = Matrix::Identity , |
|
ExtentsPerformance | ep = EXTENTS_QUICK | |||
) | const [protected, virtual] |
Reimplments the extent calculation to optimize quick extents without rendering to the sidebuffer.
Reimplemented from Papyrus::Drawable.
References Papyrus::EXTENTS_QUICK, Papyrus::Region::include(), m_radius, Papyrus::Shape::m_stroke, Papyrus::Matrix::transform_point(), Papyrus::Drawable::x(), and Papyrus::Drawable::y().
Circle::pointer Papyrus::Circle::create | ( | const AttributeValueMap & | avmap | ) | [static] |
References Circle(), and PAPYRUS_CREATE.
Circle::pointer Papyrus::Circle::create | ( | const Glib::ustring & | id, | |
double | radius = 1.0 , |
|||
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Creates a circle with the specified radius.
References PAPYRUS_CREATE.
Circle::pointer Papyrus::Circle::create | ( | double | radius = 1.0 , |
|
Fill::pointer | fill = Fill::pointer() , |
|||
Stroke::pointer | stroke = Stroke::pointer() | |||
) | [static] |
Creates a circle with the specified radius.
References PAPYRUS_CREATE.
Referenced by Papyrus::SVG::process_element().
void Papyrus::Circle::draw_shape | ( | Context & | cairo | ) | const [virtual] |
Papyrus::Circle::PAPYRUS_DRAWABLE | ( | Circle | ) |
double Papyrus::Circle::radius | ( | ) | const |
Returns the radius of this arc.
References m_radius.
void Papyrus::Circle::set | ( | const AttributeValueMap & | avmap | ) | [virtual] |
Reimplemented from Papyrus::Shape.
References set_radius(), Papyrus::Drawable::set_x(), Papyrus::Drawable::set_y(), and Papyrus::strcaseeq().
void Papyrus::Circle::set_radius | ( | double | r | ) |
Sets the radius to r.
References m_radius, m_signal_radius, and Papyrus::Shape::shape_changed().
Referenced by set().
sigc::signal< void > Papyrus::Circle::signal_radius | ( | ) |
Signal emitted when the radius is changed.
References m_signal_radius.
Glib::ustring Papyrus::Circle::svg | ( | unsigned | depth = 0 |
) | [virtual] |
Reimplemented from Papyrus::Renderable.
References m_radius, Papyrus::Shape::svg_fill(), Papyrus::Renderable::svg_id(), Papyrus::Renderable::svg_spacing(), Papyrus::Drawable::svg_transform(), Papyrus::Drawable::x(), and Papyrus::Drawable::y().
double Papyrus::Circle::m_radius [protected] |
The radius of the arc.
Referenced by calculate_extents(), draw_shape(), radius(), set_radius(), and svg().
sigc::signal<void> Papyrus::Circle::m_signal_radius [protected] |
Signal emitted when the radius is changed.
Referenced by set_radius(), and signal_radius().