_reporter->getTitle();
echo "
";
echo "{$title}";
echo "";
echo "";
echo "{$title}
";
}
/**
* places a clearing break below the end of the test nodes
*/
function paintResultsFooter() {
echo "
";
echo "";
}
/**
* paints start tag for div representing a test node
*/
function paintRectangleStart($node, $horiz, $vert) {
$name = $node->getName();
$description = $node->getDescription();
$status = $node->getStatus();
echo "";
}
/**
* paints end tag for test node div
*/
function paintRectangleEnd() {
echo "
";
}
/**
* paints wrapping treemap divs
* @todo how to configure aspect and other parameters?
*/
function paintFooter($group) {
$aspect = 1;
$this->paintResultsHeader();
$this->paintRectangleStart($this->_reporter->getGraph(), 100, 100);
$this->divideMapNodes($this->_reporter->getGraph(), $aspect);
$this->paintRectangleEnd();
$this->paintResultsFooter();
}
/**
* divides the test results based on a slice and dice algorithm
*
* @param TreemapNode $map sorted
* @param boolean $aspect flips the aspect between horizontal and vertical
* @private
*/
function divideMapNodes($map, $aspect) {
$aspect = !$aspect;
$divisions = $map->getSize();
$total = $map->getTotalSize();
foreach($map->getChildren() as $node) {
if (!$node->isLeaf()) {
$dist = $node->getTotalSize() / $total * 100;
} else {
$dist = 1 / $total * 100;
}
if ($aspect) {
$horiz = $dist;
$vert = 100;
} else {
$horiz = 100;
$vert = $dist;
}
$this->paintRectangleStart($node, $horiz, $vert);
$this->divideMapNodes($node, $aspect);
$this->paintRectangleEnd();
}
}
function paintGroupEnd($group) {
$this->_reporter->paintGroupEnd($group);
if ($this->_reporter->isComplete()) {
$this->paintFooter($group);
}
}
}
?>