Papyrus::Rectangle Class Reference

#include <papyrus/rectangle.h>

Inheritance diagram for Papyrus::Rectangle:

Inheritance graph
[legend]
List of all members.

Detailed Description

A rectangle centered on the x,y coordinate.

rectangle.png

Rectangle

Author:
Rick L Vinyard Jr


Public Types

typedef PapyrusSmartPointer<
Rectangle
pointer

Public Member Functions

double width ()
 Returns the width of the rectangle.
double height ()
 Returns the height of the rectangle.
void width_height (double &w, double &h)
 Fills parameters w and h with the width and height of the rectangle.
void set_width (double w)
 Sets the width of the rectangle to w.
void set_height (double h)
 Sets the height of the rectangle to h.
void set_width_height (double w, double h)
 Sets the width to w and height to h.
void set_xywh (double x, double y, double w, double h)
 Sets the center of the rectangle to (x,y) and also sets the width and height of the rectangle.
virtual void draw_shape (Cairo::RefPtr< Cairo::Context > cairo)
 Draws on the provided context.
sigc::signal< void > signal_size ()
 signal emitted when the size of the rectangle is changed
 PAPYRUS_CLASS_NAME ("Rectangle")
 PAPYRUS_CLONE_METHOD (Rectangle)

Static Public Member Functions

static Rectangle::pointer create (double w=0.0, double h=0.0, Cairo::RefPtr< Cairo::Pattern > fill=Cairo::RefPtr< Cairo::Pattern >())
 Creates a rectangle of a specified width and height.
static Rectangle::pointer create (double w, double h, Cairo::RefPtr< Cairo::Pattern > fill, const LineStyle &outline)
 Creates a rectangle of a specified width and height.

Protected Member Functions

 Rectangle (double w, double h, Cairo::RefPtr< Cairo::Pattern > fill)
 Rectangle (double w, double h, Cairo::RefPtr< Cairo::Pattern > fill, const LineStyle &outline)
virtual void need_redraw ()

Protected Attributes

double m_width
double m_height
sigc::signal< void > m_signal_size


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