Ejemplo n.º 1
0
 /**
  * This function draw a simple flat pie graph with shadows
  * @param array Data (PieChart->getData())
  * @param array Description (PieChart->getDataDescription())
  * @param int X-Position of the Center
  * @param int Y-Position of the Center
  * @param int Radius of the cake
  * @param const int Draw the Labels to the pies? PIE_LABELS, PIE_NOLABEL, PIE_PERCENTAGE, PIE_PERCENATGE_LABEL
  * @param int Distance between the splices
  * @param int number of decimals
  * @param ShadowProperties
  * @access public
  */
 public function drawFlatPieGraphWithShadow($Data, $DataDescription, $XPos, $YPos, $Radius = 100, $DrawLabels = PIE_NOLABEL, $SpliceDistance = 0, $Decimals = 0, ShadowProperties $shadowProperties = NULL)
 {
     /**
      * @todo Slightly ugly code follows: We want to draw the graph
      * with once to be the 'shadow', without itself having a
      * shadow, and once again to be the actual graph. In fact, we
      * can't pass ShadowProperties::NoShadow() into the first
      * drawFlatPieGraph() call, since the method expects to use
      * the color on the shadow properties, even though it is
      * inactive. We do a clone to avoid mucking with the caller's
      * copy of the shadow properties.
      */
     $inactiveShadowProperties = ShadowProperties::Copy($shadowProperties);
     $inactiveShadowProperties->active = false;
     $this->drawFlatPieGraph($Data, $DataDescription, $XPos + $shadowProperties->xDistance, $YPos + $shadowProperties->yDistance, $Radius, PIE_NOLABEL, $SpliceDistance, $Decimals, TRUE, $inactiveShadowProperties);
     $this->drawFlatPieGraph($Data, $DataDescription, $XPos, $YPos, $Radius, $DrawLabels, $SpliceDistance, $Decimals, FALSE, $inactiveShadowProperties);
 }