Papyrus::Polyline Class Reference

#include <papyrus/polyline.h>

Inheritance diagram for Papyrus::Polyline:

Inheritance graph
[legend]
List of all members.

Detailed Description

A polyline is drawn as a set of ordered vertices relative to the shape's x,y coordinate.

Polylines may be filled or unfilled. An unfilled polyline is more conceptually familiar with what is implied by a polyline. A filled polyline is essentially an unclosed polygon.

polyline.png

Unfilled Polyline

polyline_filled.png

Filled Polyline

Author:
Rick L Vinyard Jr TODO change marker handling to allow setting positional markers


Public Types

typedef PapyrusSmartPointer<
Polyline
pointer

Public Member Functions

 Polyline (Vertices vertices=Vertices())
Polylineoperator= (const Polyline &other)
LineStyleline_style ()
Vertex get_vertex (unsigned n)
const Vertices & get_vertices ()
void add_vertex (Vertex v)
void add_vertex (double x, double y)
void set_vertex (unsigned n, Vertex v)
void set_vertex (unsigned n, double x, double y)
void set_vertices (Vertices vertices)
virtual void set_line_style (const LineStyle &style)
virtual Drawable::pointer start_marker ()
virtual void set_start_marker (Drawable::pointer)
virtual Drawable::pointer end_marker ()
virtual void set_end_marker (Drawable::pointer)
virtual Drawable::pointer vertex_marker ()
virtual void set_vertex_marker (Drawable::pointer)
virtual void draw (Cairo::RefPtr< Cairo::Context > cairo)
virtual void draw_shape (Cairo::RefPtr< Cairo::Context > cairo)
 Draws on the provided context.
sigc::signal< void, unsigned > & signal_vertex ()
sigc::signal< void > & signal_vertices ()
sigc::signal< void > signal_start_marker ()
sigc::signal< void > signal_end_marker ()
sigc::signal< void > signal_vertex_marker ()
 PAPYRUS_CLASS_NAME ("Polyline")
 PAPYRUS_CLONE_METHOD (Polyline)

Static Public Member Functions

static Polyline::pointer create (Vertices vertices=Vertices())
 Creates a polyline from a specified set of vertices.

Protected Member Functions

virtual void on_vertex_changed (int n)
virtual void on_vertices_changed ()
virtual void set_extents (const Region &extents)
 Reimplemented to ensure that markers are taken into account.

Protected Attributes

Vertices m_vertices
Drawable::pointer m_start_marker
Drawable::pointer m_end_marker
Drawable::pointer m_vertex_marker
Region m_vertex_extents
sigc::signal< void, unsigned > m_signal_vertex
sigc::signal< void > m_signal_vertices
sigc::signal< void > m_signal_start_marker
sigc::signal< void > m_signal_end_marker
sigc::signal< void > m_signal_vertex_marker


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