Papyrus::Marker Class Reference

#include <papyrus/marker.h>

Inheritance diagram for Papyrus::Marker:

Inheritance graph
[legend]
List of all members.

Detailed Description

Draws an marker head or tail (not the body of the marker) with the tip or tail centered at (x,y).

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


Public Types

enum  STYLE {
  NONE, LINES, TRIANGLE, DIAMOND,
  HALF_DIAMOND, HALF_HEAD_UPPER, HALF_HEAD_LOWER, SLASHED_CROSS,
  ELLIPSE, DOT, DOUBLE_TRIANGLE, DOT_AND_TRIANGLE,
  BOX, CROW_FOOT, CROSS, ONE_OR_MANY,
  ZERO_OR_MANY, ONE_OR_ZERO, ONE_EXACTLY, CONCAVE,
  ROUND, OPEN_ROUND, BACKSLASH
}
enum  FACING { LEFT, RIGHT }
typedef PapyrusSmartPointer<
Marker
pointer

Public Member Functions

 Marker (STYLE style, double width=20.0, double height=20.0, FACING facing=RIGHT)
 Default constructor.
 ~Marker ()
 Destructor.
STYLE style () const
 
Returns:
marker style

void set_style (STYLE style)
 set marker style
double width () const
 
Returns:
drawing width of marker

void set_width (double width)
 set drawing width of marker
double height () const
 
Returns:
drawing height of marker

void set_height (double height)
 set drawing height of marker
void width_height (double &width, double &height) const
 get the drawing width and height of the marker
void set_width_height (double width, double height)
 set the drawing width and height of the marker
LineStyleline_style ()
 set the line drawing style
FACING facing () const
 
Returns:
the facing direction.

void set_facing (FACING facing)
 set the facing direction
virtual void draw_shape (Cairo::RefPtr< Cairo::Context > cairo)
 Draws on the provided context.
sigc::signal< void > signal_style ()
 Signal emitted when the style is changed.
sigc::signal< void > signal_size ()
 Signal emitted when the width or height is changed.
sigc::signal< void > signal_facing ()
 Signal emitted when the facing direction is changed.
 PAPYRUS_CLASS_NAME ("Marker")
 PAPYRUS_CLONE_METHOD (Marker)

Static Public Member Functions

static Marker::pointer create (STYLE style=NONE, double width=20.0, double height=20.0, FACING facing=RIGHT)
 Creates an marker with the specified style.

Protected Member Functions

virtual void need_redraw ()

Protected Attributes

STYLE m_style
double m_width
double m_height
FACING m_facing
sigc::signal< void > m_signal_style
 Signal emitted when the style is changed.
sigc::signal< void > m_signal_size
 Signal emitted when the width or height is changed.
sigc::signal< void > m_signal_facing
 Signal emitted when the facing direction is changed.


Member Function Documentation

Marker::FACING Papyrus::Marker::facing (  )  const

Returns:
the facing direction.

Changing the facing direction is more than a simple 180' rotation. It effects a mirror of the marker about the marker's local y-axis.


The documentation for this class was generated from the following files:
Generated on Sun Mar 11 10:01:42 2007 by  doxygen 1.5.1