papyrus logo

Papyrus::Tiling Class Reference

#include <tiling.h>

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

List of all members.

Public Member Functions

 PAPYRUS_RENDERABLE (Tiling)
virtual ~Tiling ()
unsigned rows () const
void set_rows (unsigned r)
unsigned columns () const
void set_columns (unsigned c)
void set_columns_rows (unsigned c, unsigned r)
 Sets the number of columns and rows in the quadrille.
double side_length () const
void set_side_length (double l)
Fill::pointer fill (unsigned column, unsigned row)
 The pattern that will be used to fill the cell at the given position.
void set_fill (Fill::pointer fill, unsigned column, unsigned row)
 Sets the pattern that will be used to fill the cell at the given position.
void set_fill (Paint::pointer paint, unsigned column, unsigned row)
 Creates a new Fill object for the paint and replaces the current cell fill with the new fill object.
void set_fill (Cairo::RefPtr< Cairo::Pattern > pattern, unsigned column, unsigned row)
 Creates a new Fill object for the pattern and replaces the current cell fill with the new fill object.
void set_fill (const RGBA &color, unsigned column, unsigned row)
 Creates a new Fill object for the color and replaces the current cell fill with the new fill object.
void set_fill (const Glib::ustring &fill, unsigned column, unsigned row)
 Creates a new Fill object for the color and replaces the current cell fill with the new fill object.
void set_fill_paint (const Glib::ustring &paint_name, unsigned column, unsigned row)
 Sets only the fill paint (not other fill characteristics) to the named paint.
Fill::pointer fill ()
 The pattern that will be used to fill this shape.
void set_fill (Fill::pointer fill)
 Sets the pattern that will be used to fill this shape.
void set_fill (Paint::pointer paint)
 Creates a new Fill object for the paint and replaces the current fill with the new fill object.
void set_fill (Cairo::RefPtr< Cairo::Pattern > pattern)
 Creates a new Fill object for the pattern and replaces the current fill with the new fill object.
void set_fill (const RGBA &color)
 Creates a new Fill object for the color and replaces the current fill with the new fill object.
void set_fill (const Glib::ustring &fill)
 Creates a new Fill object for the color and replaces the current fill with the new fill object.
void set_fill_paint (const Glib::ustring &paint_name)
 Sets only the fill paint (not other fill characteristics) to the named paint.
Stroke::pointer stroke ()
 The Stroke that will be used to draw the stroke.
void set_stroke (Stroke::pointer stroke)
 Sets the stroke style that will be used to stroke all cells of the quadrille.
void set_stroke (Paint::pointer paint)
 Creates a new Stroke object for the paint and replaces the current stroke with the new stroke object.
void set_stroke (Cairo::RefPtr< Cairo::Pattern > pattern)
 Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.
void set_stroke (const RGBA &color)
 Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.
void set_stroke (const Glib::ustring &stroke)
 Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.
void set_stroke_paint (const Glib::ustring &paint_name)
 Sets only the stroke paint (not other stroke characteristics) to the named paint.

Protected Member Functions

 Tiling (const Glib::ustring &id, unsigned rows, unsigned columns, double side_length)
virtual void on_default_fill_changed ()
virtual void on_fill_changed (unsigned column, unsigned row)
virtual void on_stroke_changed ()
virtual void shape_changed ()
virtual void update_centroid_x ()=0
virtual void update_centroid_y ()=0
virtual void update_centroid ()=0

Protected Attributes

unsigned m_rows
unsigned m_columns
double m_side_length
Fill::pointer ** m_fill
sigc::connection ** m_fill_changed_connection
Fill::pointer m_default_fill
Stroke::pointer m_stroke
sigc::connection m_default_fill_changed_connection
sigc::connection m_stroke_changed_connection

Detailed Description

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

Constructor & Destructor Documentation

Papyrus::Tiling::Tiling ( const Glib::ustring &  id,
unsigned  rows,
unsigned  columns,
double  side_length 
) [protected]
Papyrus::Tiling::~Tiling (  )  [virtual]

Member Function Documentation

unsigned Papyrus::Tiling::columns (  )  const

References m_columns.

Fill::pointer Papyrus::Tiling::fill (  ) 

The pattern that will be used to fill this shape.

References m_default_fill.

Referenced by set_fill_paint().

Fill::pointer Papyrus::Tiling::fill ( unsigned  column,
unsigned  row 
)

The pattern that will be used to fill the cell at the given position.

Parameters are in column,row order to relate to x,y order

References m_columns, m_FILL, and m_rows.

void Papyrus::Tiling::on_default_fill_changed (  )  [protected, virtual]

References Papyrus::Drawable::redraw().

Referenced by set_fill().

void Papyrus::Tiling::on_fill_changed ( unsigned  column,
unsigned  row 
) [protected, virtual]

References Papyrus::Drawable::redraw().

Referenced by set_fill().

void Papyrus::Tiling::on_stroke_changed (  )  [protected, virtual]
Papyrus::Tiling::PAPYRUS_RENDERABLE ( Tiling   ) 

Reimplemented from Papyrus::Drawable.

unsigned Papyrus::Tiling::rows (  )  const

References m_rows.

void Papyrus::Tiling::set_columns ( unsigned  c  ) 
void Papyrus::Tiling::set_columns_rows ( unsigned  c,
unsigned  r 
)

Sets the number of columns and rows in the quadrille.

a.k.a the width and height in squares

References Papyrus::Drawable::freeze(), m_columns, m_rows, set_columns(), set_rows(), shape_changed(), Papyrus::Drawable::thaw(), and update_centroid().

void Papyrus::Tiling::set_fill ( const Glib::ustring &  fill  ) 

Creates a new Fill object for the color and replaces the current fill with the new fill object.

References Papyrus::Fill::create(), Papyrus::Group::lookup_paint(), Papyrus::Drawable::m_parent, and set_fill().

void Papyrus::Tiling::set_fill ( const RGBA color  ) 

Creates a new Fill object for the color and replaces the current fill with the new fill object.

References Papyrus::Fill::create(), and set_fill().

void Papyrus::Tiling::set_fill ( Cairo::RefPtr< Cairo::Pattern >  pattern  ) 

Creates a new Fill object for the pattern and replaces the current fill with the new fill object.

References Papyrus::Fill::create(), and set_fill().

void Papyrus::Tiling::set_fill ( Paint::pointer  paint  ) 

Creates a new Fill object for the paint and replaces the current fill with the new fill object.

References Papyrus::Fill::create(), and set_fill().

void Papyrus::Tiling::set_fill ( Fill::pointer  fill  ) 

Sets the pattern that will be used to fill this shape.

References m_default_fill, m_default_fill_changed_connection, and on_default_fill_changed().

void Papyrus::Tiling::set_fill ( const Glib::ustring &  fill,
unsigned  column,
unsigned  row 
)

Creates a new Fill object for the color and replaces the current cell fill with the new fill object.

References Papyrus::Fill::create(), Papyrus::Group::lookup_paint(), Papyrus::Drawable::m_parent, and set_fill().

void Papyrus::Tiling::set_fill ( const RGBA color,
unsigned  column,
unsigned  row 
)

Creates a new Fill object for the color and replaces the current cell fill with the new fill object.

References Papyrus::Fill::create(), and set_fill().

void Papyrus::Tiling::set_fill ( Cairo::RefPtr< Cairo::Pattern >  pattern,
unsigned  column,
unsigned  row 
)

Creates a new Fill object for the pattern and replaces the current cell fill with the new fill object.

References Papyrus::Fill::create(), and set_fill().

void Papyrus::Tiling::set_fill ( Paint::pointer  paint,
unsigned  column,
unsigned  row 
)

Creates a new Fill object for the paint and replaces the current cell fill with the new fill object.

References Papyrus::Fill::create(), and set_fill().

void Papyrus::Tiling::set_fill ( Fill::pointer  fill,
unsigned  column,
unsigned  row 
)

Sets the pattern that will be used to fill the cell at the given position.

References m_columns, m_FILL, m_FILL_CHANGED_CONNECTION, m_rows, and on_fill_changed().

Referenced by set_fill(), and set_fill_paint().

void Papyrus::Tiling::set_fill_paint ( const Glib::ustring &  paint_name  ) 

Sets only the fill paint (not other fill characteristics) to the named paint.

Shapes do not inherently have a set of paints, therefore they must look to their parents. If they do not have a parent, this will have no effect.

References Papyrus::Fill::create(), m_default_fill, Papyrus::Drawable::m_parent, and set_fill().

void Papyrus::Tiling::set_fill_paint ( const Glib::ustring &  paint_name,
unsigned  column,
unsigned  row 
)

Sets only the fill paint (not other fill characteristics) to the named paint.

Shapes do not inherently have a set of paints, therefore they must look to their parents. If they do not have a parent, this will have no effect.

References Papyrus::Fill::create(), fill(), Papyrus::Drawable::m_parent, and set_fill().

void Papyrus::Tiling::set_rows ( unsigned  r  ) 
void Papyrus::Tiling::set_side_length ( double  l  ) 
void Papyrus::Tiling::set_stroke ( const Glib::ustring &  stroke  ) 

Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.

References Papyrus::Stroke::create(), and set_stroke().

void Papyrus::Tiling::set_stroke ( const RGBA color  ) 

Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.

References Papyrus::Stroke::create(), and set_stroke().

void Papyrus::Tiling::set_stroke ( Cairo::RefPtr< Cairo::Pattern >  pattern  ) 

Creates a new Stroke object for the pattern and replaces the current stroke with the new stroke object.

References Papyrus::Stroke::create(), and set_stroke().

void Papyrus::Tiling::set_stroke ( Paint::pointer  paint  ) 

Creates a new Stroke object for the paint and replaces the current stroke with the new stroke object.

References Papyrus::Stroke::create(), and set_stroke().

void Papyrus::Tiling::set_stroke ( Stroke::pointer  stroke  ) 

Sets the stroke style that will be used to stroke all cells of the quadrille.

References m_stroke, m_stroke_changed_connection, and on_stroke_changed().

Referenced by set_stroke(), and set_stroke_paint().

void Papyrus::Tiling::set_stroke_paint ( const Glib::ustring &  paint_name  ) 

Sets only the stroke paint (not other stroke characteristics) to the named paint.

Shapes do not inherently have a set of paints, therefore they must look to their parents. If they do not have a parent, this will have no effect.

References Papyrus::Stroke::create(), Papyrus::Drawable::m_parent, m_stroke, and set_stroke().

void Papyrus::Tiling::shape_changed (  )  [protected, virtual]
double Papyrus::Tiling::side_length (  )  const

References m_side_length.

Stroke::pointer Papyrus::Tiling::stroke (  ) 

The Stroke that will be used to draw the stroke.

References m_stroke.

Referenced by Papyrus::Quadrille::draw(), Papyrus::Hextille::draw(), and Papyrus::Deltille::draw().

virtual void Papyrus::Tiling::update_centroid (  )  [protected, pure virtual]
virtual void Papyrus::Tiling::update_centroid_x (  )  [protected, pure virtual]

Implemented in Papyrus::Deltille, Papyrus::Hextille, and Papyrus::Quadrille.

Referenced by set_rows().

virtual void Papyrus::Tiling::update_centroid_y (  )  [protected, pure virtual]

Member Data Documentation

unsigned Papyrus::Tiling::m_columns [protected]

Referenced by set_fill().

Referenced by Tiling(), and ~Tiling().

sigc::connection** Papyrus::Tiling::m_fill_changed_connection [protected]

Referenced by Tiling(), and ~Tiling().

unsigned Papyrus::Tiling::m_rows [protected]
double Papyrus::Tiling::m_side_length [protected]
sigc::connection Papyrus::Tiling::m_stroke_changed_connection [protected]

Referenced by set_stroke().


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

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