proland::ComposedMargin Class Reference
[graph]

A Margin is used to determine what to clip in a graph. More...

#include <ComposedMargin.h>

Inheritance diagram for proland::ComposedMargin:
proland::Margin

List of all members.

Public Member Functions

 ComposedMargin ()
 Creates a new ComposedMargin.
virtual ~ComposedMargin ()
 Deletes this ComposedMargin.
virtual double getMargin (double clipSize)
 Returns the maximum margin from contained margins (max borderSize).
virtual double getMargin (double clipSize, CurvePtr p)
 Returns the maximum margin from contained margins.
virtual double getMargin (double clipSize, AreaPtr a)
 Returns the maximum margin from contained margins.
void addMargin (Margin *m)
 Adds a margin.
void removeMargin (Margin *m)
 Removes a margin.

Private Attributes

vector< Margin * > margins
 list of margins.

Detailed Description

A Margin is used to determine what to clip in a graph.

It enables to take into account the width of a curve when clipping a box. For example, when drawing a road that would go along a border, the curve would be in only one tile, but considering the curve's width, the drawing would be cut on the tile border. That is why we need margins. This class enables to check multiple Margins at the same time.

Author:
Antoine Begault

Constructor & Destructor Documentation

proland::ComposedMargin::ComposedMargin (  ) 

Creates a new ComposedMargin.

virtual proland::ComposedMargin::~ComposedMargin (  )  [virtual]

Deletes this ComposedMargin.


Member Function Documentation

void proland::ComposedMargin::addMargin ( Margin m  ) 

Adds a margin.

Parameters:
m a margin.
virtual double proland::ComposedMargin::getMargin ( double  clipSize,
AreaPtr  a 
) [virtual]

Returns the maximum margin from contained margins.

Parameters:
clipSize size of the clipping box.
a the area to get the margin from.

Reimplemented from proland::Margin.

virtual double proland::ComposedMargin::getMargin ( double  clipSize,
CurvePtr  p 
) [virtual]

Returns the maximum margin from contained margins.

Parameters:
clipSize size of the clipping box.
p the curve to get the margin from.

Implements proland::Margin.

virtual double proland::ComposedMargin::getMargin ( double  clipSize  )  [virtual]

Returns the maximum margin from contained margins (max borderSize).

Parameters:
clipSize size of the clipping box.

Implements proland::Margin.

void proland::ComposedMargin::removeMargin ( Margin m  ) 

Removes a margin.

param m a margin.


Member Data Documentation

list of margins.


Generated on Sat May 12 09:42:47 2012 for proland by  doxygen 1.6.1