当前位置: 首页>>代码示例>>PHP>>正文


PHP ezcGraphColor::create方法代码示例

本文整理汇总了PHP中ezcGraphColor::create方法的典型用法代码示例。如果您正苦于以下问题:PHP ezcGraphColor::create方法的具体用法?PHP ezcGraphColor::create怎么用?PHP ezcGraphColor::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ezcGraphColor的用法示例。


在下文中一共展示了ezcGraphColor::create方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __set

 /**
  * __set 
  * 
  * @param mixed $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBaseValueException
  *          If a submitted parameter was out of range or type.
  * @throws ezcBasePropertyNotFoundException
  *          If a the value for the property options is not an instance of
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'startPoint':
             if (!$propertyValue instanceof ezcGraphCoordinate) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'ezcGraphCoordinate');
             } else {
                 $this->properties['startPoint'] = $propertyValue;
             }
             break;
         case 'endPoint':
             if (!$propertyValue instanceof ezcGraphCoordinate) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'ezcGraphCoordinate');
             } else {
                 $this->properties['endPoint'] = $propertyValue;
             }
             break;
         case 'startColor':
             $this->properties['startColor'] = ezcGraphColor::create($propertyValue);
             break;
         case 'endColor':
             $this->properties['endColor'] = ezcGraphColor::create($propertyValue);
             break;
     }
 }
开发者ID:gbleydon,项目名称:mahara-survey,代码行数:37,代码来源:linear_gradient.php

示例2: __set

 /**
  * Set an option value
  *
  * @param string $propertyName
  * @param mixed $propertyValue
  * @throws ezcBasePropertyNotFoundException
  *          If a property is not defined in this class
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'borderWidth':
         case 'markerWidth':
             if (!is_numeric($propertyValue) || $propertyValue < 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 1');
             }
             $this->properties[$propertyName] = (int) $propertyValue;
             break;
         case 'borderColor':
         case 'startColor':
         case 'endColor':
             $this->properties[$propertyName] = ezcGraphColor::create($propertyValue);
             break;
         case 'odometerHeight':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         default:
             return parent::__set($propertyName, $propertyValue);
     }
 }
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:35,代码来源:odometer_chart.php

示例3: __set

 /**
  * __set 
  * 
  * @param mixed $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBaseValueException
  *          If a submitted parameter was out of range or type.
  * @throws ezcBasePropertyNotFoundException
  *          If a the value for the property options is not an instance of
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'center':
             if (!$propertyValue instanceof ezcGraphCoordinate) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'ezcGraphCoordinate');
             } else {
                 $this->properties['center'] = $propertyValue;
             }
             break;
         case 'width':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 0');
             }
             $this->properties['width'] = (double) $propertyValue;
             break;
         case 'height':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 0');
             }
             $this->properties['height'] = (double) $propertyValue;
             break;
         case 'offset':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties['offset'] = $propertyValue;
             break;
         case 'startColor':
             $this->properties['startColor'] = ezcGraphColor::create($propertyValue);
             break;
         case 'endColor':
             $this->properties['endColor'] = ezcGraphColor::create($propertyValue);
             break;
     }
 }
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:48,代码来源:radial_gradient.php

示例4: __set

 /**
  * __set 
  * 
  * @param mixed $propertyName Property name
  * @param mixed $propertyValue Property value
  * @access public
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'axisColor':
         case 'majorGridColor':
         case 'minorGridColor':
         case 'fontColor':
         case 'chartBackground':
         case 'chartBorderColor':
         case 'elementBackground':
         case 'elementBorderColor':
             $this->{$propertyName} = ezcGraphColor::create($propertyValue);
             break;
         case 'dataSetColor':
             if (!is_array($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'array( ezcGraphColor )');
             }
             $this->dataSetColor = array();
             foreach ($propertyValue as $value) {
                 $this->dataSetColor[] = ezcGraphColor::create($value);
             }
             $this->colorIndex = -1;
             break;
         case 'dataSetSymbol':
             if (!is_array($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'array( (int) ezcGraph::SYMBOL_TYPE )');
             }
             $this->dataSetSymbol = array();
             foreach ($propertyValue as $value) {
                 $this->dataSetSymbol[] = (int) $value;
             }
             $this->symbolIndex = -1;
             break;
         case 'fontName':
             $this->{$propertyName} = (string) $propertyValue;
             break;
         case 'chartBorderWidth':
         case 'elementBorderWidth':
         case 'padding':
         case 'margin':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->{$propertyName} = (int) $propertyValue;
             break;
         default:
             throw new ezcBasePropertyNotFoundException($propertyName);
     }
 }
开发者ID:broschb,项目名称:cyclebrain,代码行数:57,代码来源:palette.php

示例5: checkValue

 /**
  * Converts value to an {@link ezcGraphColor} object
  * 
  * @param & $value 
  * @return void
  */
 protected function checkValue(&$value)
 {
     $value = ezcGraphColor::create($value);
     return true;
 }
开发者ID:mediasadc,项目名称:alba,代码行数:11,代码来源:color.php

示例6: __set

 /**
  * __set 
  * 
  * @param mixed $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBaseValueException
  *          If a submitted parameter was out of range or type.
  * @throws ezcBasePropertyNotFoundException
  *          If a the value for the property options is not an instance of
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'title':
             $this->properties['title'] = (string) $propertyValue;
             break;
         case 'background':
             $this->properties['background'] = ezcGraphColor::create($propertyValue);
             break;
         case 'border':
             $this->properties['border'] = ezcGraphColor::create($propertyValue);
             break;
         case 'padding':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['padding'] = (int) $propertyValue;
             break;
         case 'margin':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['margin'] = (int) $propertyValue;
             break;
         case 'borderWidth':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['borderWidth'] = (int) $propertyValue;
             break;
         case 'font':
             if ($propertyValue instanceof ezcGraphFontOptions) {
                 $this->properties['font'] = $propertyValue;
             } elseif (is_string($propertyValue)) {
                 if (!$this->fontCloned) {
                     $this->properties['font'] = clone $this->font;
                     $this->properties['fontCloned'] = true;
                 }
                 $this->properties['font']->path = $propertyValue;
             } else {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'ezcGraphFontOptions');
             }
             break;
         case 'position':
             $positions = array(ezcGraph::TOP, ezcGraph::BOTTOM, ezcGraph::LEFT, ezcGraph::RIGHT);
             if (in_array($propertyValue, $positions, true)) {
                 $this->properties['position'] = $propertyValue;
             } else {
                 throw new ezcBaseValueException('position', $propertyValue, 'integer');
             }
             break;
         case 'maxTitleHeight':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['maxTitleHeight'] = (int) $propertyValue;
             break;
         case 'portraitTitleSize':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties['portraitTitleSize'] = (double) $propertyValue;
             break;
         case 'landscapeTitleSize':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties['landscapeTitleSize'] = (double) $propertyValue;
             break;
         default:
             throw new ezcBasePropertyNotFoundException($propertyName);
             break;
     }
 }
开发者ID:broschb,项目名称:cyclebrain,代码行数:86,代码来源:element.php

示例7: __set

 /**
  * Set an option value
  * 
  * @param string $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBasePropertyNotFoundException
  *          If a property is not defined in this class
  * @return void
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'minFontSize':
             if (!is_numeric($propertyValue) || $propertyValue < 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 1');
             }
             // Ensure min font size is smaller or equal max font size.
             if ($propertyValue > $this->properties['maxFontSize']) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float <= ' . $this->properties['maxFontSize']);
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'maxFontSize':
             if (!is_numeric($propertyValue) || $propertyValue < 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 1');
             }
             // Ensure max font size is greater or equal min font size.
             if ($propertyValue < $this->properties['minFontSize']) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float >= ' . $this->properties['minFontSize']);
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'minimalUsedFont':
             $propertyValue = (double) $propertyValue;
             if ($propertyValue < $this->minimalUsedFont) {
                 $this->properties['minimalUsedFont'] = $propertyValue;
             }
             break;
         case 'color':
         case 'background':
         case 'border':
         case 'textShadowColor':
             $this->properties[$propertyName] = ezcGraphColor::create($propertyValue);
             break;
         case 'borderWidth':
         case 'padding':
         case 'textShadowOffset':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties[$propertyName] = (int) $propertyValue;
             break;
         case 'minimizeBorder':
         case 'textShadow':
             if (!is_bool($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'bool');
             }
             $this->properties[$propertyName] = (bool) $propertyValue;
             break;
         case 'name':
             if (is_string($propertyValue)) {
                 $this->properties['name'] = $propertyValue;
             } else {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'string');
             }
             break;
         case 'path':
             if (is_file($propertyValue) && is_readable($propertyValue)) {
                 $this->properties['path'] = $propertyValue;
                 $parts = pathinfo($this->properties['path']);
                 switch (strtolower($parts['extension'])) {
                     case 'fdb':
                         $this->properties['type'] = ezcGraph::PALM_FONT;
                         break;
                     case 'pfb':
                         $this->properties['type'] = ezcGraph::PS_FONT;
                         break;
                     case 'ttf':
                         $this->properties['type'] = ezcGraph::TTF_FONT;
                         break;
                     case 'svg':
                         $this->properties['type'] = ezcGraph::SVG_FONT;
                         $this->properties['name'] = ezcGraphSvgFont::getFontName($propertyValue);
                         break;
                     default:
                         throw new ezcGraphUnknownFontTypeException($propertyValue, $parts['extension']);
                 }
                 $this->pathChecked = true;
             } else {
                 throw new ezcBaseFileNotFoundException($propertyValue, 'font');
             }
             break;
         case 'type':
             if (is_int($propertyValue)) {
                 $this->properties['type'] = $propertyValue;
             } else {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int');
             }
             break;
         default:
//.........这里部分代码省略.........
开发者ID:jose-martins,项目名称:glpi,代码行数:101,代码来源:font.php

示例8: testInvertRandomColor

 public function testInvertRandomColor()
 {
     $color = ezcGraphColor::create('#123456')->invert();
     $this->assertEquals($color, ezcGraphColor::create('#EDCBA9'));
 }
开发者ID:xyzz,项目名称:CrashFix,代码行数:5,代码来源:color_test.php

示例9: __set

 /**
  * Set an option value
  * 
  * @param string $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBasePropertyNotFoundException
  *          If a property is not defined in this class
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'pieChartShadowSize':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float >= 0');
             }
             $this->properties['pieChartShadowSize'] = (int) $propertyValue;
             break;
         case 'pieChartShadowTransparency':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties['pieChartShadowTransparency'] = (double) $propertyValue;
             break;
         case 'pieChartShadowColor':
             $this->properties['pieChartShadowColor'] = ezcGraphColor::create($propertyValue);
             break;
         default:
             return parent::__set($propertyName, $propertyValue);
     }
 }
开发者ID:gbleydon,项目名称:mahara-survey,代码行数:32,代码来源:renderer_2d.php

示例10: __set

 /**
  * __set 
  * 
  * @param mixed $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBaseValueException
  *          If a submitted parameter was out of range or type.
  * @throws ezcBasePropertyNotFoundException
  *          If a the value for the property options is not an instance of
  * @return void
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'nullPosition':
             $this->properties['nullPosition'] = (double) $propertyValue;
             break;
         case 'axisSpace':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue >= 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float < 1');
             }
             $this->properties['axisSpace'] = (double) $propertyValue;
             break;
         case 'outerAxisSpace':
             if (!is_null($propertyValue) && (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue >= 1)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'null, or 0 <= float < 1');
             }
             $this->properties['outerAxisSpace'] = $propertyValue;
             break;
         case 'majorGrid':
             $this->properties['majorGrid'] = ezcGraphColor::create($propertyValue);
             break;
         case 'minorGrid':
             $this->properties['minorGrid'] = ezcGraphColor::create($propertyValue);
             break;
         case 'majorStep':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 0');
             }
             $this->properties['majorStep'] = (double) $propertyValue;
             break;
         case 'minorStep':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 0');
             }
             $this->properties['minorStep'] = (double) $propertyValue;
             break;
         case 'formatString':
             $this->properties['formatString'] = (string) $propertyValue;
             break;
         case 'label':
             $this->properties['label'] = (string) $propertyValue;
             break;
         case 'labelSize':
             if (!is_numeric($propertyValue) || $propertyValue <= 6) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 6');
             }
             $this->properties['labelSize'] = (int) $propertyValue;
             break;
         case 'labelMargin':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['labelMargin'] = (int) $propertyValue;
             break;
         case 'maxArrowHeadSize':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['maxArrowHeadSize'] = (int) $propertyValue;
             break;
         case 'minArrowHeadSize':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties['minArrowHeadSize'] = (int) $propertyValue;
             break;
         case 'axisLabelRenderer':
             if ($propertyValue instanceof ezcGraphAxisLabelRenderer) {
                 $this->axisLabelRenderer = $propertyValue;
             } else {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'ezcGraphAxisLabelRenderer');
             }
             break;
         case 'labelCallback':
             if (is_callable($propertyValue)) {
                 $this->properties['labelCallback'] = $propertyValue;
             } else {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'callback function');
             }
             break;
         case 'chartPosition':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties['chartPosition'] = (double) $propertyValue;
             break;
         case 'labelRotation':
             if (!is_numeric($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float');
//.........这里部分代码省略.........
开发者ID:jose-martins,项目名称:glpi,代码行数:101,代码来源:axis.php

示例11: __set

 /**
  * Set an option value
  * 
  * @param string $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBasePropertyNotFoundException
  *          If a property is not defined in this class
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'dataBorder':
         case 'pieChartGleam':
         case 'legendSymbolGleam':
             if ($propertyValue !== false && !is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'false OR 0 <= float <= 1');
             }
             $this->properties[$propertyName] = $propertyValue === false ? false : (double) $propertyValue;
             break;
         case 'maxLabelHeight':
         case 'moveOut':
         case 'barMargin':
         case 'barPadding':
         case 'legendSymbolGleamSize':
         case 'pieVerticalSize':
         case 'pieHorizontalSize':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'symbolSize':
         case 'titlePosition':
         case 'titleAlignement':
         case 'pieChartGleamBorder':
             if (!is_numeric($propertyValue) || $propertyValue < 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'int >= 0');
             }
             $this->properties[$propertyName] = (int) $propertyValue;
             break;
         case 'showSymbol':
         case 'syncAxisFonts':
             if (!is_bool($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'bool');
             }
             $this->properties[$propertyName] = (bool) $propertyValue;
             break;
         case 'pieChartOffset':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 360) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 360');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'pieChartSymbolColor':
         case 'pieChartGleamColor':
         case 'legendSymbolGleamColor':
             $this->properties[$propertyName] = ezcGraphColor::create($propertyValue);
             break;
         default:
             return parent::__set($propertyName, $propertyValue);
     }
 }
开发者ID:andikoller,项目名称:FHC-3.0-FHBGLD,代码行数:64,代码来源:renderer.php

示例12: __set

 /**
  * Set an option value
  * 
  * @param string $propertyName 
  * @param mixed $propertyValue 
  * @throws ezcBasePropertyNotFoundException
  *          If a property is not defined in this class
  * @return void
  * @ignore
  */
 public function __set($propertyName, $propertyValue)
 {
     switch ($propertyName) {
         case 'fillAxis':
         case 'fillGrid':
             if ($propertyValue !== false && !is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'false OR 0 <= float <= 1');
             }
             $this->properties[$propertyName] = $propertyValue === false ? false : (double) $propertyValue;
             break;
         case 'depth':
         case 'pieChartRotation':
         case 'pieChartShadowTransparency':
         case 'barDarkenSide':
         case 'barDarkenTop':
         case 'barChartGleam':
             if (!is_numeric($propertyValue) || $propertyValue < 0 || $propertyValue > 1) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, '0 <= float <= 1');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'pieChartHeight':
         case 'pieChartShadowSize':
             if (!is_numeric($propertyValue) || $propertyValue <= 0) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'float > 0');
             }
             $this->properties[$propertyName] = (double) $propertyValue;
             break;
         case 'seperateLines':
             if (!is_bool($propertyValue)) {
                 throw new ezcBaseValueException($propertyName, $propertyValue, 'bool');
             }
             $this->properties['seperateLines'] = $propertyValue;
             break;
         case 'pieChartShadowColor':
             $this->properties['pieChartShadowColor'] = ezcGraphColor::create($propertyValue);
             break;
         default:
             return parent::__set($propertyName, $propertyValue);
     }
 }
开发者ID:andikoller,项目名称:FHC-3.0-FHBGLD,代码行数:51,代码来源:renderer_3d.php

示例13: ezcGraphPieChart

<?php

require_once 'tutorial_autoload.php';
$graph = new ezcGraphPieChart();
$graph->title = 'Access statistics';
$graph->options->label = '%2$d (%3$.1f%%)';
$graph->data['Access statistics'] = new ezcGraphArrayDataSet(array('Mozilla' => 19113, 'Explorer' => 10917, 'Opera' => 1464, 'Safari' => 652, 'Konqueror' => 474));
$graph->data['Access statistics']->highlight['Explorer'] = true;
$graph->data['Access statistics']->symbol = ezcGraph::BULLET;
$graph->renderer = new ezcGraphRenderer3d();
$graph->renderer->options->pieChartShadowSize = 5;
$graph->renderer->options->pieChartShadowColor = ezcGraphColor::create('#000000');
$graph->renderer->options->pieChartGleam = 0.5;
$graph->renderer->options->dataBorder = false;
$graph->renderer->options->pieChartHeight = 8;
$graph->renderer->options->pieChartSymbolColor = '#888A8588';
$graph->renderer->options->pieChartRotation = 0.8;
$graph->renderer->options->legendSymbolGleam = 0.5;
$graph->renderer->options->legendSymbolGleamSize = 0.9;
$graph->renderer->options->legendSymbolGleamColor = '#FFFFFF';
$graph->driver = new ezcGraphCairoDriver();
$graph->render(400, 150, 'tutorial_driver_cairo.png');
开发者ID:andikoller,项目名称:FHC-3.0-FHBGLD,代码行数:22,代码来源:tutorial_driver_cairo.php

示例14: testRenderOdometerMarker

 public function testRenderOdometerMarker()
 {
     $chart = new ezcGraphOdometerChart();
     $chart->data['sampleData'] = new ezcGraphArrayDataSet(array('sample 1' => 234, 'sample 2' => 21, 'sample 3' => 324, 'sample 4' => 1, 'sample 5' => 120));
     $mockedRenderer = $this->getMock('ezcGraphRenderer2d', array('drawOdometerMarker'));
     $mockedRenderer->expects($this->at(0))->method('drawOdometerMarker')->with($this->equalTo(new ezcGraphBoundings(25.0, 50.0, 475.0, 150.0), 1.0), $this->equalTo(new ezcGraphCoordinate(0.585, 0.0), 0.001), $this->equalTo(ezcGraph::NO_SYMBOL), $this->equalTo(ezcGraphColor::create('#3465A4')), $this->equalTo(2));
     $mockedRenderer->expects($this->at(1))->method('drawOdometerMarker')->with($this->equalTo(new ezcGraphBoundings(25.0, 50.0, 475.0, 150.0), 1.0), $this->equalTo(new ezcGraphCoordinate(0.0525, 0.0), 0.001), $this->equalTo(ezcGraph::NO_SYMBOL), $this->equalTo(ezcGraphColor::create('#4E9A06')), $this->equalTo(2));
     $mockedRenderer->expects($this->at(2))->method('drawOdometerMarker')->with($this->equalTo(new ezcGraphBoundings(25.0, 50.0, 475.0, 150.0), 1.0), $this->equalTo(new ezcGraphCoordinate(0.8100000000000001, 0.0), 0.001), $this->equalTo(ezcGraph::NO_SYMBOL), $this->equalTo(ezcGraphColor::create('#CC0000')), $this->equalTo(2));
     $chart->renderer = $mockedRenderer;
     $chart->render(500, 200);
 }
开发者ID:naderman,项目名称:ezc-graph,代码行数:11,代码来源:odometer_test.php


注:本文中的ezcGraphColor::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。