Source for file Perimeter.php
Documentation is available at Perimeter.php
* <p>Title: Perimeter class</p>
* <p>Description: Perimeter function.</p>
* <pre><font face="Courier" size="4">
* $function = new Perimeter();
* $function->setChart($myChart->getChart());
* $function->setPeriod(0); //all points
* $functionSeries = new Line($myChart->getChart());
* $functionSeries->setTitle("Perimeter");
* $functionSeries->setDataSource($series);
* $functionSeries->getXValues()->setOrder(ValueListOrder::$NONE);
* //$functionSeries->setVerticalAxis(VerticalAxis::$RIGHT);
* $functionSeries->setFunction($function);
* <p>Copyright (c) 2005-2008 by Steema Software SL. All Rights
* <p>Company: Steema Software SL</p>
function __get( $property ) {
$method = "get{$property}";
function __set ( $property,$value ) {
$method = "set{$property}";
return $this->$method($value);
if ($src->getCount() > 0) {
$p = Array(); // Array of Point[$src->getCount()]
if ($src->getVertAxis()->iAxisSize == 0 ||
$src->getHorizAxis()->iAxisSize == 0) {
// MS : Not good, rectangle is (0,0,0,0).
// How to match it with actual size ??
// TODO check $this->getChart()->getParent()->refreshControl();
$tmpG = $this->getChart()->getGraphics3D();
for ( $t = 0; $t < $src->getCount(); $t++ ) {
$p[$t] = $tmpG->calc3DPoint(
$src->calcXPos($t), $src->calcYPos($t),
$sz = $tmpG->convexHull($p);
for ( $t = 0; $t < $sz; $t++ ) {
$p[$t]->getX()), $this->getSeries()->yScreenToValue($p[$t]->getY()));
|