BoardLib::ShapeList Struct Reference

A group of shapes. More...

#include <ShapeList.h>

Inheritance diagram for BoardLib::ShapeList:

BoardLib::Shape BoardLib::Board BoardLib::Board BoardLib::Group

List of all members.

Public Member Functions

 ShapeList (int depth=-1)
 ShapeList (const ShapeList &other)
void clear ()
Point center () const
Shaperotate (double angle, const Point &center)
Shaperotate (double angle)
Shapetranslate (double dx, double dy)
Shapescale (double sx, double sy)
void flushPostscript (std::ostream &stream, const TransformEPS &transform) const
void flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const
void flushSVG (std::ostream &stream, const TransformSVG &transform) const
Rect boundingBox () const
Shapeclone () const
ShapeListoperator= (const ShapeList &other)
ShapeListoperator<< (const Shape &shape)

Protected Member Functions

void free ()

Protected Attributes

std::vector< Shape * > _shapes
int _nextDepth


Detailed Description

A group of shapes.

The ShapeList structure.


Member Function Documentation

Point BoardLib::ShapeList::center (  )  const [virtual]

Returns the gravity center of the shape.

Returns:
The center of the shape.

Implements BoardLib::Shape.

Shape & BoardLib::ShapeList::rotate ( double  angle,
const Point center 
) [virtual]

Rotate the shape around a given center of rotation.

Parameters:
angle The rotation angle in radian.
center The center of rotation.
Returns:
A reference to the shape itself.

Implements BoardLib::Shape.

Shape & BoardLib::ShapeList::rotate ( double  angle  )  [virtual]

Rotate the shape around its center.

Parameters:
angle The rotation angle in radian.
Returns:
A reference to the shape itself.

Implements BoardLib::Shape.

Shape & BoardLib::ShapeList::translate ( double  dx,
double  dy 
) [virtual]

Translate the shape by a given offset.

Parameters:
dx The x offset.
dy The y offset.
Returns:
A reference to the shape itself.

Implements BoardLib::Shape.

Shape & BoardLib::ShapeList::scale ( double  sx,
double  sy 
) [virtual]

Scale the shape along the x an y axis.

Parameters:
sx The scale factor along the x axis.
sy The scale factor along the y axis.
Returns:
The shape itself.

Implements BoardLib::Shape.

void BoardLib::ShapeList::flushPostscript ( std::ostream &  stream,
const TransformEPS transform 
) const [virtual]

Writes the EPS code of the shape in a stream according to a transform.

Parameters:
stream The output stream.
transform A 2D transform to be applied.

Implements BoardLib::Shape.

Reimplemented in BoardLib::Group.

void BoardLib::ShapeList::flushFIG ( std::ostream &  stream,
const TransformFIG transform,
std::map< Color, int > &  colormap 
) const [virtual]

Writes the FIG code of the shape in a stream according to a transform.

Parameters:
stream The output stream.
transform A 2D transform to be applied.

Implements BoardLib::Shape.

Reimplemented in BoardLib::Group.

void BoardLib::ShapeList::flushSVG ( std::ostream &  stream,
const TransformSVG transform 
) const [virtual]

Writes the SVG code of the shape in a stream according to a transform.

Parameters:
stream The output stream.
transform A 2D transform to be applied.

Implements BoardLib::Shape.

Reimplemented in BoardLib::Group.

Rect BoardLib::ShapeList::boundingBox (  )  const [virtual]

Returns the bounding box of the figure.

Returns:
The rectangle of the bounding box.

Implements BoardLib::Shape.

Shape * BoardLib::ShapeList::clone (  )  const [virtual]

Return a copy of the shape.

Returns:

Implements BoardLib::Shape.

Reimplemented in BoardLib::Group.

void BoardLib::ShapeList::free (  )  [protected]

Free the memory used by the shapes in the shape vector.


Member Data Documentation

std::vector<Shape*> BoardLib::ShapeList::_shapes [protected]

The vector of shapes.

int BoardLib::ShapeList::_nextDepth [protected]

The depth of the next figure to be added.


The documentation for this struct was generated from the following files:
Generated on Mon Dec 17 11:15:52 2007 for Board by  doxygen 1.5.3-20071008