Pedigree::Area(3)

NAME
Pedigree::Area - Calculate the area taken by a tree or a clump

SYNOPSIS
use Pedigree::Area;

$area = new Pedigree::Area($node);

$Ymin=$area->GetYmin();

$area->SetYmin($Ymin);

$Ymax=$area->GetYmax();

$area->SetYmax($Ymax);

$Xmin=$area->GetXmin($y);

$area->SetXmin($y,$x);

$Xmax=$area->GetXmax($y);

$area->SetXmax($y,$x);

$area->AddRight($otherarea);

$area->AddLeft($otherarea);

$rootnode=$area->GetRootNode();

$area->MoveLowerLayers($x);

DESCRIPTION
The algorithm of pedigree(1) uses the notion of area: a part of a picture taken by a tree or a clump. This package implements this notion.

Each Area has rootnode - the reference node for all calculations. All distances are calculated as relative to the coordinates of the rootnode.

The units are distances between the nodes in X and Y direction. The Y axis is downward: the earlier generations have smaller Y coordinates.

    new($rootnode);

    Construct a new area around the given rootnode

    GetYmin();

    Get the lower bound of the area.

    SetYmin($y);

    Set the lower bound of the area.

    GetYmax();

    Get the upper bound of the area.

    SetYmax($y);

    Set the upper bound of the area.

    GetXmin($y);

    Get the minimal X coordinate of the area on the level Y.

    SetXmin($y, $x);

    Set the minimal X coordinate of the area on the level Y.

    GetXmax($y);

    Get the maximal X coordinate of the area the the level Y.

    SetXmax($y, $x);

    Set the maximal X coordinate of the area the the level Y.

    AddRight($otherarea);

    Add the new area $otherarea to the given area at the right. The "other area" should have a root node that is relative to our root node. The relative Y of the other root node is used, the relative X is set.

    AddLeft($otherarea);

    Add the new area $otherarea to the given area at the left. The "other area" should have a root node that is relative to our root node. The relative Y of the other root node is used, the relative X is set.

    GetRootNode();

    Return the root node of the area.

    MoveLowerLayers($x);

    Shift the lower layers (>0) of the area in the X direction by $x

ENVIRONMENT
The calling program should define $main::DEBUG and set it to 0 or 1.

SEE ALSO
pedigree(1), Pedigree(3)

AUTHOR
Boris Veytsman, Leila Akhmadeeva, 2006, 2007

POD ERRORS
Hey! The above document had some coding errors, which are explained below:

Around line 51:
    You can't have =items (as at line 69) unless the first thing after the =over is an =item