BoardLib::Line Struct Reference

A line between two points. More...

#include <Shapes.h>

Inheritance diagram for BoardLib::Line:

BoardLib::Shape BoardLib::Arrow List of all members.

Public Member Functions

 Line (double x1, double y1, double x2, double y2, Color color, float lineWidth, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, unsigned int depth=0)
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

Public Attributes

double x1
double y1
double x2
double y2

Detailed Description

A line between two points.

The line structure.


Constructor & Destructor Documentation

BoardLib::Line::Line ( double  x1,
double  y1,
double  x2,
double  y2,
Color  color,
float  lineWidth,
const LineCap  cap = ButtCap,
const LineJoin  join = MiterJoin,
unsigned int  depth = 0 
) [inline]

Constructs a line.

Parameters:
x1 First coordinate of the start point.
y1 Second coordinate of the start point.
x2 First coordinate of the end point.
y2 Second coordinate of the end point.
color The color of the line.
lineWidth The line thickness.
depth The depth of the line.


Member Function Documentation

void BoardLib::Line::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::Arrow.

void BoardLib::Line::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::Arrow.

void BoardLib::Line::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::Arrow.

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

Returns the bounding box of the figure.

Returns:
The rectangle of the bounding box.

Implements BoardLib::Shape.


Member Data Documentation

double BoardLib::Line::x1

First coordinate of the start point.

double BoardLib::Line::y1

Second coordinate of the start point.

double BoardLib::Line::x2

First coordinate of the end point.

double BoardLib::Line::y2

Second coordinate of the end point.


The documentation for this struct was generated from the following files:
Generated on Fri Aug 24 19:07:40 2007 for Board by  doxygen 1.5.1