papyrus logo

Papyrus::Circle Class Reference

A circle is drawn centered on the x,y coordinate with a specified radius. More...

#include <circle.h>

Inheritance diagram for Papyrus::Circle:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

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.png

Circle

Author:
Rick L Vinyard Jr

Constructor & Destructor Documentation

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]

Member Function Documentation

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]

Draws on the provided context.

Implements Papyrus::Shape.

References m_radius.

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]
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]

Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on Fri Apr 16 12:41:06 2010 for papyrus by doxygen 1.6.1