papyrus logo

Papyrus::Stroke Class Reference

#include <stroke.h>

Inheritance diagram for Papyrus::Stroke:

Inheritance graph
[legend]

List of all members.

Public Types

typedef PapyrusPointer< Strokepointer

Public Member Functions

virtual ~Stroke ()
Strokeoperator= (const Stroke &other)
bool operator== (const Stroke &other) const
bool operator!= (const Stroke &other) const
const std::valarray< double > & dash_array ()
double dash_offset ()
void set_dash (const std::valarray< double > dashes=std::valarray< double >(), double offset=0.0)
Cairo::LineCap cap ()
void set_cap (Cairo::LineCap cap=Cairo::LINE_CAP_BUTT)
void set_cap (const Glib::ustring &c)
 Sets the cap according to the string value.
Cairo::LineJoin join ()
void set_join (Cairo::LineJoin join=Cairo::LINE_JOIN_MITER)
void set_join (const Glib::ustring &c)
 Sets the join according to the string value.
double width ()
void set_width (double width=1.0)
double miter_limit ()
void set_miter_limit (double limit=INFINITY)
Paint::pointer paint ()
void set_paint (Paint::pointer paint=Paint::pointer())
virtual void render (Cairo::RefPtr< Cairo::Context > cairo) const
sigc::signal< void > signal_paint_changed ()
sigc::signal< void > signal_width_changed ()
sigc::signal< void > signal_cap_changed ()
sigc::signal< void > signal_join_changed ()
sigc::signal< void > signal_miter_limit_changed ()
sigc::signal< void > signal_dash_changed ()

Static Public Member Functions

static pointer create (Paint::pointer paint=Paint::pointer(), double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER)
static pointer create (double width, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER)
static pointer create (Cairo::RefPtr< Cairo::Pattern > pattern, double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER)
static pointer create (const RGBA &rgba, double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER)
static pointer create (const Glib::ustring &color, double width=1.0, Cairo::LineCap cap=Cairo::LINE_CAP_BUTT, Cairo::LineJoin join=Cairo::LINE_JOIN_MITER)

Protected Member Functions

 Stroke (double width, Cairo::LineCap cap, Cairo::LineJoin join)
 Stroke (Paint::pointer paint, double width, Cairo::LineCap cap, Cairo::LineJoin join)
void on_paint_changed ()

Protected Attributes

Paint::pointer m_paint
double m_width
Cairo::LineCap m_cap
Cairo::LineJoin m_join
double m_miter_limit
std::valarray< double > m_dash_array
double m_dash_offset
sigc::signal< void > m_signal_paint_changed
sigc::signal< void > m_signal_width_changed
sigc::signal< void > m_signal_cap_changed
sigc::signal< void > m_signal_join_changed
sigc::signal< void > m_signal_miter_limit_changed
sigc::signal< void > m_signal_dash_changed
sigc::connection m_paint_changed_connection


Detailed Description

Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>

Member Typedef Documentation

typedef PapyrusPointer<Stroke> Papyrus::Stroke::pointer

Reimplemented from Papyrus::Renderable.


Constructor & Destructor Documentation

Papyrus::Stroke::Stroke ( double  width,
Cairo::LineCap  cap,
Cairo::LineJoin  join 
) [protected]

Referenced by create().

Papyrus::Stroke::Stroke ( Paint::pointer  paint,
double  width,
Cairo::LineCap  cap,
Cairo::LineJoin  join 
) [protected]

Papyrus::Stroke::~Stroke (  )  [virtual]


Member Function Documentation

Cairo::LineCap Papyrus::Stroke::cap (  ) 

References m_cap.

Stroke::pointer Papyrus::Stroke::create ( const Glib::ustring &  color,
double  width = 1.0,
Cairo::LineCap  cap = Cairo::LINE_CAP_BUTT,
Cairo::LineJoin  join = Cairo::LINE_JOIN_MITER 
) [static]

References Papyrus::strcaseeq(), and Stroke().

Stroke::pointer Papyrus::Stroke::create ( const RGBA rgba,
double  width = 1.0,
Cairo::LineCap  cap = Cairo::LINE_CAP_BUTT,
Cairo::LineJoin  join = Cairo::LINE_JOIN_MITER 
) [static]

Stroke::pointer Papyrus::Stroke::create ( Cairo::RefPtr< Cairo::Pattern >  pattern,
double  width = 1.0,
Cairo::LineCap  cap = Cairo::LINE_CAP_BUTT,
Cairo::LineJoin  join = Cairo::LINE_JOIN_MITER 
) [static]

Stroke::pointer Papyrus::Stroke::create ( double  width,
Cairo::LineCap  cap = Cairo::LINE_CAP_BUTT,
Cairo::LineJoin  join = Cairo::LINE_JOIN_MITER 
) [static]

Stroke::pointer Papyrus::Stroke::create ( Paint::pointer  paint = Paint::pointer(),
double  width = 1.0,
Cairo::LineCap  cap = Cairo::LINE_CAP_BUTT,
Cairo::LineJoin  join = Cairo::LINE_JOIN_MITER 
) [static]

const std::valarray< double > & Papyrus::Stroke::dash_array (  ) 

References m_dash_array.

Referenced by render().

double Papyrus::Stroke::dash_offset (  ) 

References m_dash_offset.

Cairo::LineJoin Papyrus::Stroke::join (  ) 

References m_join.

double Papyrus::Stroke::miter_limit (  ) 

References m_miter_limit.

void Papyrus::Stroke::on_paint_changed (  )  [protected]

bool Papyrus::Stroke::operator!= ( const Stroke other  )  const

References operator==().

Stroke & Papyrus::Stroke::operator= ( const Stroke other  ) 

bool Papyrus::Stroke::operator== ( const Stroke other  )  const

References m_cap, m_dash_offset, m_join, m_miter_limit, m_paint, and m_width.

Referenced by operator!=().

Paint::pointer Papyrus::Stroke::paint (  ) 

References m_paint.

void Papyrus::Stroke::render ( Cairo::RefPtr< Cairo::Context >  cairo  )  const [virtual]

void Papyrus::Stroke::set_cap ( const Glib::ustring &  c  ) 

Sets the cap according to the string value.

Values are case independent and are the same as SVG: butt , round or square .

References set_cap().

void Papyrus::Stroke::set_cap ( Cairo::LineCap  cap = Cairo::LINE_CAP_BUTT  ) 

void Papyrus::Stroke::set_dash ( const std::valarray< double >  dashes = std::valarray<double>(),
double  offset = 0.0 
)

void Papyrus::Stroke::set_join ( const Glib::ustring &  c  ) 

Sets the join according to the string value.

Values are case independent and are the same as SVG: miter , round or bevel .

References set_join().

void Papyrus::Stroke::set_join ( Cairo::LineJoin  join = Cairo::LINE_JOIN_MITER  ) 

void Papyrus::Stroke::set_miter_limit ( double  limit = INFINITY  ) 

void Papyrus::Stroke::set_paint ( Paint::pointer  paint = Paint::pointer()  ) 

void Papyrus::Stroke::set_width ( double  width = 1.0  ) 

sigc::signal< void > Papyrus::Stroke::signal_cap_changed (  ) 

References m_signal_cap_changed.

sigc::signal< void > Papyrus::Stroke::signal_dash_changed (  ) 

References m_signal_dash_changed.

sigc::signal< void > Papyrus::Stroke::signal_join_changed (  ) 

References m_signal_join_changed.

sigc::signal< void > Papyrus::Stroke::signal_miter_limit_changed (  ) 

sigc::signal< void > Papyrus::Stroke::signal_paint_changed (  ) 

sigc::signal< void > Papyrus::Stroke::signal_width_changed (  ) 

double Papyrus::Stroke::width (  ) 

References m_width.


Member Data Documentation

Cairo::LineCap Papyrus::Stroke::m_cap [protected]

std::valarray<double> Papyrus::Stroke::m_dash_array [protected]

double Papyrus::Stroke::m_dash_offset [protected]

Cairo::LineJoin Papyrus::Stroke::m_join [protected]

double Papyrus::Stroke::m_miter_limit [protected]

sigc::connection Papyrus::Stroke::m_paint_changed_connection [protected]

Referenced by operator=(), set_paint(), and Stroke().

sigc::signal<void> Papyrus::Stroke::m_signal_cap_changed [protected]

sigc::signal<void> Papyrus::Stroke::m_signal_dash_changed [protected]

sigc::signal<void> Papyrus::Stroke::m_signal_join_changed [protected]

sigc::signal<void> Papyrus::Stroke::m_signal_miter_limit_changed [protected]

sigc::signal<void> Papyrus::Stroke::m_signal_paint_changed [protected]

sigc::signal<void> Papyrus::Stroke::m_signal_width_changed [protected]

double Papyrus::Stroke::m_width [protected]


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

Generated on Wed Mar 18 12:34:58 2009 for papyrus by doxygen 1.5.7.1