Source for file Pie.php
Documentation is available at Pie.php
* Description: Pie Series
* $pieSeries = new Pie($myChart->getChart());
* $pieSeries->getMarks()->setVisible(true);
* $pieSeries->getShadow()->setVisible(true);
* $pieSeries->getShadow()->setHorizSize(20);
* $pieSeries->getShadow()->setVertSize(20);
* $pieSeries->fillSampleValues(8);
* $myChart->getHeader()->setVisible(true);
* $myChart->getHeader()->setText("Pie");
* $myChart->getAspect()->setElevation(315);
* $myChart->getAspect()->setOrthogonal(false);
* $myChart->getAspect()->setPerspective(0);
* $myChart->getAspect()->setRotation(360);
* @copyright (c) 1995-2008 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @link http://www.steema.com
private $angleSize = 360;
private $explodedSlice= null;
private $explodeBiggest= 0;
private $otherSlice= null;
private $usePatterns= false;
private $autoMarkPosition = true;
private $sortedSlice= null;
private $isExploded= false;
private $edgeStyle= 2; // EdgeStyles::$NONE
private $multiPie= 0; // MultiPies::AUTOMATIC
function __get( $property ) {
$method = "get{$property}";
function __set ( $property,$value ) {
$method = "set{$property}";
return $this->$method($value);
public function Pie($c= null) {
$this->OtherFlag = intval('1000000000000'); // Integer.MAX_VALUE
$tmpColor = new Color(0,0,0); // Black
$this->getMarks()->setDefaultVisible(true);
$this->marks->getArrow()->setDefaultColor($tmpColor);
$this->marks->getCallout()->setDefaultLength(8);
* Stores the Pie slice values.
if ($this->pen != null) {
$this->pen->setChart($this->chart);
if ($this->shadow != null) {
$this->shadow->setChart($this->chart);
* Draws points with different preset Colors.<br>
return parent::getColorEach();
* Draws points with different preset Colors.<br>
parent::setColorEach($value);
* Total angle in degrees (0 to 360) for all slices.<br>
* Total angle in degrees (0 to 360) for all slices.<br>
* <pre><font face="Courier" size="4">
* pieSeries = new com.steema.teechart.styles.Pie(myChart.getChart());
* pieSeries.getMarks().setVisible(true);
* pieSeries.getMarks().setStyle(MarksStyle.LABELPERCENT);
* pieSeries.fillSampleValues(5);
* pieSeries.setAngleSize(180);
* pieSeries.setRotationAngle(90);
* Darkens side of 3D pie section to add depth.<br>
* When true, it fills the Pie 3D effect screen areas with darker colors
* than their corresponding Pie sectors. These colors look much better
* with 16k colors video mode or greater. <br>
* The Pie sector RGB color is increased to 40 units to obtain the darker
* Darkens side of 3D pie section to add depth.<br>
* The Transparency level from 0 to 100%.<br>
* Transparency is a value between 0 and 100 which sets the transparency
* percentage with respect to foreground versus background.<br>
return $this->getBrush()->getTransparency();
* Sets Transparency level from 0 to 100%.<br>
$this->getBrush()->setTransparency($value);
** Gets and sets the EdgeStyle of the bevel.
if ($this->edgeStyle != $value)
$this->edgeStyle = $value;
** Gets and sets the bevel as a percentage of the pie's depth.
return $this->bevelPercent;
if ($this->bevelPercent != $value)
$this->bevelPercent = $value;
* Darkens pie slice borders.<br>
* Darkens pie slice borders.<br>
* Displaces the biggest slice from centre by value set.<br>
return $this->explodeBiggest;
* Displaces the biggest slice from centre by value set.<br>
$this->calcExplodeBiggest();
* Accesses the OtherSlice properties.<br>
* For example, you can use it to define the grouping size for the
* 'Other' slice of the Pie.<br>
* Grouping may be expressed as a percentage or value.<br>
* <pre><font face="Courier" size="4">
* pieSeries.getOtherSlice().getLegend().setVisible(isSelected);
* @see com.steema.teechart.styles.Pie.PieOtherSlice#getStyle
if ($this->otherSlice == null) {
return $this->otherSlice;
* Brush fill for PieSeries.
* Defines the offset shadow of the PieSeries.
* <pre><font face="Courier" size="4">
* pieSeries = new com.steema.teechart.styles.Pie(myChart.getChart());
* pieSeries.getMarks().setVisible(true);
* pieSeries.getShadow().setVisible(true);
* pieSeries.getShadow().setWidth(30);
* pieSeries.getShadow().setHeight(50);
* pieSeries.getShadow().setColor(Color.SILVER);
* pieSeries.fillSampleValues(9);
if ($this->shadow == null) {
* Fills Pie Sectors with different Brush pattern styles.<br>
return $this->usePatterns;
* Fills Pie Sectors with different Brush pattern styles.<br>
* If true, marks will be displayed trying to not overlap one to each
return $this->autoMarkPosition;
* If true, marks will be displayed trying to not overlap one to each
private function calcExplodeBiggest() {
private function calcExplodedOffset($valueIndex) {
// Apply exploded % to radius
$tmp = $this->angles[$valueIndex]->MidAngle;
if ($this->chart->getGraphics3D()->getSupportsFullRotation()) {
$tmp += (0.25 * 2.0 * M_PI * $this->angleSize / 360.0) +
parent::galleryChanged3D($is3D);
$this->disableRotation();
private function getAngleSlice($index, $totalAngle) {
if ($result > $totalAngle) {
if ($result > (0.25 * $totalAngle)) {
$result -= (0.25 * $totalAngle);
$result = $totalAngle - $result;
$result = (0.25 * $totalAngle) - $result;
private function disableRotation() {
$a = $this->chart->getAspect();
$a->setOrthogonal(false);
parent::swapValueIndex($a, $b);
for ( $t = 0; $t < $numValues; $t++ ) {
$pieSampleStr[$t % 8]); // <-- Label
private function SliceEndZ($valueIndex)
if (sizeof($this->sliceHeight) > $valueIndex)
$this->getStartZ()) * $this->sliceHeight->getSlice($valueIndex) * 0.01);
private function calcAngles() {
$totalAngle = 2.0 * M_PI * $this->angleSize / 360.0;
// todo remove $tmpSumAbs; // = $this->getYValues()->getTotalABS();
$tmpSumAbs += abs($this->mandatory->getValue($i));
$tmpSumAbs = $this->mandatory->getTotalABS();
$piPortion = ($tmpSumAbs != 0) ? $totalAngle / $tmpSumAbs : 0;
// TODO check remove -> this was before $this->angles =new PieAngle[$this->getCount()];
// TODO remove new PieAngle[$this->getCount()];
if ($acumValue == $tmpSumAbs) {
$this->angles[$t]->EndAngle = $totalAngle;
$this->angles[$t]->EndAngle = $acumValue * $piPortion;
/* prevent small pie sectors */
if (($this->angles[$t]->EndAngle - $this->angles[$t]->StartAngle) >
$this->angles[$t]->EndAngle = $this->angles[$t]->StartAngle + $totalAngle;
$this->angles[$t]->EndAngle = $totalAngle;
$this->angles[$t]->MidAngle = ($this->angles[$t]->StartAngle + $this->angles[$t]->EndAngle) *
parent::doBeforeDrawChart();
/* remove "other" slice, if exists...
for ( $t = 0; $t < $this->getCount(); $t++) {
if ($this->vxValues->value[$t] == $this->OtherFlag) {
$this->removeOtherSlice();
$tmpOtherMark= $this->otherMarkCustom();
/* calc "Other" slice... */
if (($this->otherSlice != null) &&
for ( $t = 0; $t < $this->getCount(); $t++ ) {
$tmp = $tmp * 100.0 / $this->getYValues()->getTotalABS();
if ($tmp < $this->otherSlice->getValue()) {
/* <-- belongs to "other" */
$t= $this->add($this->OtherFlag, $tmpValue, $this->otherSlice->text, $this->otherSlice->getColor());
$this->getYValues()->totalABS -= $tmpValue; /* $total */
if ($tmpOtherMark != null)
$this->getMarks()->getPositions()->setPosition($t,$tmpOtherMark);
// Returns index of "this" into all visible Pie series
private function pieIndex()
for ($i= 0; $i< $this->getChart()->getSeriesCount();$i++ )
if ($this->chart->getSeries($i) === $this)
// Returns number of visible Pie series
private function pieCount()
for ($i= 0; $i< $this->chart->getSeriesCount();$i++ )
if (($this->chart->getSeries($i)->getActive()) && ($this->sameClass($this->chart->getSeries($i))))
private function guessRectangle()
$tmpCount = $this->pieCount();
$tmpIndex = $this->pieIndex();
$tmpR = $this->chart->getChartRect();
$tmpW = $tmpR->getWidth();
$tmpH = $tmpR->getHeight();
$tmpR->setX($tmpR->getX() + ($tmpIndex % $tmpCols) * ($tmpW / $tmpCols));
$tmpR->setWidth(($tmpW / $tmpCols));
$tmpR->setY($tmpR->getY() + (($tmpIndex / $tmpCols)) * ($tmpH / $tmpRows));
$tmpR->setHeight(($tmpH / $tmpRows));
$this->chart->setChartRect($this->chart->getGraphics3D()->calcRect3D($tmpR, 0));
// Calculate "this" Pie rectangle, when multiple pie series exist.
$this->iOldChartRect = $this->chart->getChartRect();
if ($this->multiPie == MultiPies::$AUTOMATIC)
parent::doBeforeDrawValues();
// Resets back old chart rectangle
$this->chart->setChartRect($this->iOldChartRect);
parent::doAfterDrawValues();
private function removeOtherSlice()
/* remove "other" slice, if exists... */
for ($t = 0; $t < $this->getCount(); $t++ )
if ($this->vxValues->getValue($t) == $this->OtherFlag)
private function otherMarkCustom()
for ($i = 0; $i < $this->getCount(); $i++ )
if ($this->vxValues->getValue($i) == $this->OtherFlag)
$tmp = $this->getMarks()->getPositions()->getPosition($i);
if ($tmp != null && $tmp->custom)
protected function draw() {
if ($this->explodeBiggest > 0) {
$this->calcExplodeBiggest();
// calc biggest exploded index
// calc each slice angles
//adjust circle rectangle
$this->isExploded = ($maxExplodedIndex != - 1);
$tmpOff = $this->calcExplodedOffset($maxExplodedIndex);
- abs($tmpOff->getY()) / 2);
//InflateRect(circleRect,-Math.abs(tmpOffX) /2 ,-Math.abs(tmpOffY) / 2);
$g = $this->chart->getGraphics3D();
if (($this->shadow != null) && ($this->shadow->getVisible()) &&
(!$this->shadow->getColor()->isEmpty()) &&
(($this->shadow->getWidth() != 0) || ($this->shadow->getHeight() != 0))) {
$g->setBrush($this->shadow->getBrush());
$g->getPen()->setVisible(false);
$r->offset($this->shadow->getWidth(), $this->shadow->getHeight());
$g->ellipse($r, $this->getEndZ() - 10);
//CDI PieOtherSlice Legend
$rect = $this->chart->getChartRect();
$tmp = $this->chart->getLegend();
$rect = $this->chart->doDrawLegend($g, $rect);
$this->chart->setLegend($tmp);
if ($this->shouldDrawShadow())
{ // TODO review rect params
/* exploded slices drawing order... */
if ($this->chart->getAspect()->getView3D() && ($this->isExploded || ($this->iDonutPercent > 0))
&& (!$g->getSupportsFullRotation())) {
if ($this->sortedSlice == null) {
$this->sortedSlice = Array(); // TODO remove int[$tmpCount];
for ( $t = 0; $t < $tmpCount; $t++ ) {
$this->sortedSlice[$t] = $t;
for ( $t = 0; $t < $tmpCount; $t++ ) {
$tmp = $this->chart->getLegend();
$rect = $this->chart->doDrawLegend($g, $rect);
$this->chart->setLegend($tmp);
private function shouldDrawShadow()
return ($this->shadow != null) && ($this->shadow->bVisible) &&
(!Utils::colorIsEmpty($this->shadow->getColor())) && (($this->shadow->getWidth() != 0) ||
($this->shadow->getHeight() != 0));
/*protected boolean drawMarksSeries(Series s, boolean activeRegion)
IGraphics3D g = chart.getGraphics3D();
return super.drawMarksSeries(s, activeRegion);
protected function drawMark($valueIndex, $s, $position) {
// if ($this->chart->getGraphics3D()->getSupportsFullRotation()) {
// $tmp = $this->angles[$valueIndex]->MidAngle + M_PI + 0.5 * M_PI;
// $this->getMarks()->setZPosition($this->getStartZ());
// $tmp = $this->angles[$valueIndex]->MidAngle;
// $this->getMarks()->setZPosition($this->getEndZ());
$tmp = $this->angles[$valueIndex]->MidAngle;
$this->getMarks()->setZPosition($this->SliceEndZ($valueIndex));
$position->arrowFix = true;
$tmpLength = $this->getMarks()->getCallout()->getLength() +
$this->getMarks()->getCallout()->getDistance();
/*+Drawing.TextWidth(TeeCharForHeight)*/
/*+Drawing.FontHeight*/+ $tmpLength
$position->arrowTo = $tmpXY;
$tmpLength = $this->getMarks()->getCallout()->getDistance();
$tmpXY = $this->angleToPos($tmp, $tmpRadius->x + $tmpLength,
$tmpRadius->y + $tmpLength);
$position->arrowFrom = $tmpXY;
$position->leftTop->x = $position->arrowTo->x;
$position->leftTop->x = $position->arrowTo->x - $position->width;
$position->leftTop->y = $position->arrowTo->y;
$position->leftTop->y = $position->arrowTo->y - $position->height;
$tmpypos = $position->height / 2;
if ($position->arrowTo->y > $this->iCircleYCenter) $position->arrowTo->y += $tmpypos;
else $position->arrowTo->y -= $tmpypos;
$position->hasMid = false;
$position->midPoint->x = 0;
$position->midPoint->y = 0;
$position->hasMid = true;
if (($position->arrowTo->x - $this->getMarksPie()->getLegSize()) < $position->arrowFrom->x)
$position->midPoint->x = $position->arrowFrom->x;
$position->arrowTo->x = $position->arrowTo->x + $this->getMarksPie()->getLegSize();
$position->leftTop->x = $position->arrowTo->x;
$position->midPoint->x = $position->arrowTo->x - $this->getMarksPie()->getLegSize();
if (($position->arrowTo->x + $this->getMarksPie()->getLegSize()) > $position->arrowFrom->x)
$position->midPoint->x = $position->arrowFrom->x;
$position->arrowTo->x = $position->arrowFrom->x - $this->getMarksPie()->getLegSize();
$position->leftTop->x = $position->arrowTo->x - $position->width;
$position->midPoint->x = $position->arrowTo->x + $this->getMarksPie()->getLegSize();
$position->midPoint->y = $position->arrowTo->y;
parent::drawMark($valueIndex, $s, $position);
if ($this->pieMarks == null) {
$this->pieMarks = $value;
//TJ71012746 pending checks at
//Graphics finishSide(endAngle, z0);
$tmpOff = $this->calcExplodedOffset($valueIndex);
$g = $this->chart->getGraphics3D();
$this->iDonutPercent, $this->bevelPercent, $this->edgeStyle, false);
public function drawPie($valueIndex) {
$tmpOff = $this->calcExplodedOffset($valueIndex);
$g = $this->chart->getGraphics3D();
if (($this->chart->getAspect()->getView3D()) || ($this->iDonutPercent == 0)) {
$g->pie($this->iCircleXCenter + $tmpOff->getX(),
$this->iCircleYCenter - $tmpOff->getY(),
$this->iXRadius, $this->iYRadius, $this->getStartZ(), $this->getEndZ(),
$this->angles[$valueIndex]->StartAngle + $this->rotDegree,
$this->angles[$valueIndex]->EndAngle + $this->rotDegree,
$g->donut($this->iCircleXCenter + $tmpOff->getX(), $this->iCircleYCenter - $tmpOff->getY(),
$this->iXRadius, $this->iYRadius,
$this->angles[$valueIndex]->StartAngle + $this->rotDegree,
$this->angles[$valueIndex]->EndAngle + $this->rotDegree,
// g.Pie( circleXCenter+tmpOffX,
// circleYCenter-tmpOffY,
// xRadius,yRadius, getStartZ(), getEndZ(),
// Angles[valueIndex].StartAngle+rotDegree,
// Angles[valueIndex].EndAngle+rotDegree,
// AngleToPos(Angles[valueIndex].EndAngle,xRadius,yRadius,out EndX,out EndY);
// if ( ((IniX!=EndX) || (IniY!=EndY)) || (Count==1) ||
// ( (Count>1) && (Angles[valueIndex].EndAngle-Angles[ValueIndex].StartAngle>1) ) )
// Rectangle r=circleRect;
// g.Pie(r.x+tmpOffX,r.y-tmpOffY,r.Right()+tmpOffX,r.Bottom()-tmpOffY,
// 180*Angles[valueIndex].StartAngle/Math.PI,
// 180*Angles[valueIndex].EndAngle/Math.PI);
// // g.Pie(r.x+tmpOffX,r.y-tmpOffY,r.Right+tmpOffX,r.Bottom-tmpOffY,
// // IniX+tmpOffX,IniY-tmpOffY,EndX+tmpOffX,EndY-tmpOffY);
public function drawPie($valueIndex,$last) {
$tmpOff = $this->calcExplodedOffset($valueIndex);
$g = $this->chart->getGraphics3D();
// if ((chart.getAspect().getView3D()) || (iDonutPercent == 0)) {
// g.pie(iCircleXCenter + tmpOff.x,
// iCircleYCenter - tmpOff.y,
// iXRadius, iYRadius, getStartZ(), SliceEndZ(valueIndex),
// angles[valueIndex].StartAngle + rotDegree,
// angles[valueIndex].EndAngle + rotDegree,
// //if ( donutPercent>0 )
// g.donut(iCircleXCenter + tmpOff.x, iCircleYCenter - tmpOff.y,
// angles[valueIndex].StartAngle + rotDegree,
// angles[valueIndex].EndAngle + rotDegree,
// CalcExplodedOffset(valueIndex, out tmpOffX, out tmpOffY);
if ($this->angleSize < 360)
$this->isExploded = true;
$this->iDonutPercent, $this->bevelPercent, $this->edgeStyle,$last);
* Called internally. Draws the "ValueIndex" point of the Series.
if ($this->usePatterns || $this->chart->getGraphics3D()->getMonochrome()) {
$this->bBrush->setSolid(true);
$tmpColor = $this->chart->getGraphics3D()->getMonochrome() ?
$this->preparePiePen($this->chart->getGraphics3D(), $valueIndex);
parent::prepareForGallery($isEnabled);
$this->chart->getAspect()->setChart3DPercent(75);
$this->getMarks()->getCallout()->setLength(0);
$this->disableRotation();
//CDI PieOtherSlice.Legend
$tmpIsOther = $this->chart->getLegend() != null &&
for ( $t = 0; $t < $this->getCount(); $t++ ) {
if (($tmpIsOther && $tmp) || ((!$tmpIsOther) && (!$tmp))) {
if ($num == $legendIndex) {
private function preparePiePen($g, $valueIndex) {
$tmpGraphics3D = new Graphics3D();
$tmpGraphics3D->DARKERCOLORQUANTITY));
$this->preparePiePen($g, $valueIndex);
if ($this->usePatterns || $g->getMonochrome()) {
* Returns true if indexed Slice belongs to the Otherslice.<br>
* The "other" slice is controlled by the OtherSlice method, and is used
* to join several small slices into a single bigger one.
* Returns the pixel Screen Horizontal coordinate of the ValueIndex Series value.
if ($this->vxValues->value[$valueIndex] == $this->OtherFlag) {
return parent::calcXPos($valueIndex);
$tmpResult = parent::clicked($x, $y);
$tmpResult = $this->calcClickedPie($x, $y);
private function calcClickedPie($x, $y) {
if ($this->chart != null) {
$p = $this->chart->getGraphics3D()->calculate2DPosition($x, $y,
$this->chart->getAspect()->getWidth3D());
for ( $result = 0; $result < $this->getCount(); $result++ ) {
$tmpOff = $this->calcExplodedOffset($result);
if ($this->angles[$result]->contains($tmpAngle)) {
for ( $t = 0; $t < $this->getCount(); $t++ ) {
//if(chart.ILegend!=null && chart.ILegend == OtherSlice.Legend) {
if ($this->chart->getLegend() != null &&
parent::createSubGallery($addSubChart);
$addSubChart->createSubChart($this->Language->getString("Patterns"));
$addSubChart->createSubChart($this->Language->getString("Exploded"));
$addSubChart->createSubChart($this->Language->getString("Shadow"));
$addSubChart->createSubChart($this->Language->getString("Marks"));
$addSubChart->createSubChart($this->Language->getString("SemiPie"));
$addSubChart->createSubChart($this->Language->getString("NoBorder"));
$addSubChart->createSubChart($this->Language->getString("DarkPen"));
$this->getPen()->setVisible(false);
* Accesses the properties for exploding any Pie slice.
* @return ExplodedSliceList
if ($this->explodedSlice== null)
return $this->explodedSlice;
return $this->Language->getString("GalleryPie");
* <p>Title: PieOtherSlice class</p>
* <p>Description: Pie series uses this class in its Pie.OtherSlice.</p>
* <p>Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.</p>
* <p>Company: Steema Software SL</p>
$tmpColor = new Color(0,0,0,0,true); // EMPTY black
$this->color = $tmpColor;
if ($this->series == null) {
* The Color of the OtherSlice.
* Sets the Color of the OtherSlice.
private function setLegend($value) {
if ($this->legend != null) {
$this->legend->setSeries($this->series);
* Sets the properties of the PieOtherSlice Legend.<br><br>
* Example This sample shows how to use PieOtherSlice Legend:<br><br>
* prepare "Other" to group values below 10<br>
* pie1.getOtherSlice().setStyle(PieOtherStyles.BELOWVALUE);<br>
* pie1.getOtherSlice().setValue(10);<br>
* pie1.getOtherSlice().setText("Other");<br>
* pie1.getOtherSlice().getLegend().setVisible( true );<br>
* pie1.getOtherSlice().getLegend().setCustomPosition( true );<br>
* pie1.getOtherSlice().getLegend().setLeft( 350 );<br>
* pie1.getOtherSlice().getLegend().setTop( 150 );<br>
if ($this->legend == null) {
$this->legend = new Legend($this->series->getChart());
$this->legend->setVisible(false);
$this->legend->setSeries($this->series);
* Title for otherSlice.<br>
* Title for otherSlice.<br>
* Value (value or percentage) for Otherslice grouping.
* Value (value or percentage) for Otherslice grouping.
* Either value or percentage to group the 'other' Pie slice.
* Sets either value or percentage to group the 'other' Pie slice.
* @param value PieOtherStyles
if ($this->style != $value) {
* <p>Title: PieShadow class</p>
* <p>Description: Pie series uses this class in its Pie.Shadow.</p>
* <p>Copyright (c) 2005-2007 by Steema Software SL. All Rights Reserved.</p>
* <p>Company: Steema Software SL</p>
$tmpColor = new Color(120,120,120); // DARK_GRAY
$this->bBrush->setDefaultColor($tmpColor);
* <p>Title: ExplodedSliceList class</p>
* <p>Description: List to hold percents of exploding effect, one per each
* <p>Copyright (c) 2005-2007 by Steema Software SL. All Rights Reserved.</p>
* <p>Company: Steema Software SL</p>
/* class ExplodedSliceList extends ArrayObject {
public function ExplodedSliceList($capacity) {
// TODO remove ? parent::ExplodedSliceList($capacity);
public function getSlice($index) {
if ($index < sizeof($this)) {
return ((int)parent::get($index));
public function setSlice($index, $value) {
while (sizeof($this) <= $index) {
$this->add(new Integer(0));
$this->set($index, new Integer($value));
private function exchange($a, $b) {
$s = $this->getSlice($a);
$this->setSlice($a, $this->getSlice($b));
$totalAngle = 2.0 * M_PI * $this->angleSize / 360.0;
$tmpA = $this->getAngleSlice($this->sortedSlice[$a], $totalAngle);
$tmpB = $this->getAngleSlice($this->sortedSlice[$b], $totalAngle);
} else if ($tmpA > $tmpB) {
* <p>Title: SliceValueList class</p>
* <p>Description: List to hold percents of height for each Pie slice.</p>
* <p>Copyright (c) 2005-2007 by Steema Software SL. All Rights Reserved.</p>
* <p>Company: Steema Software SL</p>
return ((int) parent::offsetGet($index));
public function setSlice($index, $value) {
while ($index >= sizeof($this)) {
if ( ((int) parent::offsetGet($index)) != $value) {
parent::offsetSet($index, $value);
private function exchange($a, $b) {
* <p>Title: ExplodedSliceList class</p>
* <p>Description: List to hold percents of exploding effect, one per each
* <p>Copyright (c) 2005-2007 by Steema Software SL. All Rights Reserved.</p>
* <p>Company: Steema Software SL</p>
return ((int) parent::offsetGet($index));
public function setSlice($index, $value) {
while (sizeof($this) <= $index) {
parent::offsetSet($index, $value);
private function exchange($a, $b) {
|