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


PHP Image_Canvas::pieslice方法代码示例

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


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

示例1: pieslice

 /**
  * Draw a pie slice
  *
  * Parameter array:
  * 'x': int X center point
  * 'y': int Y center point
  * 'rx': int X radius
  * 'ry': int Y radius
  * 'v1': int The starting angle (in degrees)
  * 'v2': int The end angle (in degrees)
  * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut)
  * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut)
  * 'fill': mixed [optional] The fill color
  * 'line': mixed [optional] The line color
  * @param array $params Parameter array
  */
 function pieslice($params)
 {
     if (isset($this->_imageMap)) {
         $this->_imageMap->pieslice($params);
     }
     parent::pieslice($params);
 }
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:23,代码来源:WithMap.php

示例2: pieslice

 /**
  * Draw a pie slice
  *
  * Parameter array:
  * 'x': int X center point
  * 'y': int Y center point
  * 'rx': int X radius
  * 'ry': int Y radius
  * 'v1': int The starting angle (in degrees)
  * 'v2': int The end angle (in degrees)
  * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut)
  * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut)
  * 'fill': mixed [optional] The fill color
  * 'line': mixed [optional] The line color
  * @param array $params Parameter array
  */
 function pieslice($params)
 {
     $x = $this->_getX($params['x']);
     $y = $this->_getY($params['y']);
     $rx = $this->_getX($params['rx']);
     $ry = $this->_getY($params['ry']);
     $v1 = $this->_getX($params['v1']);
     $v2 = $this->_getY($params['v2']);
     $srx = isset($params['srx']) ? $this->_getX($params['srx']) : false;
     $sry = isset($params['sry']) ? $this->_getX($params['sry']) : false;
     $fillColor = isset($params['fill']) ? $params['line'] : false;
     $lineColor = isset($params['line']) ? $params['line'] : false;
     $dv = max($v2, $v1) - min($v2, $v1);
     if ($dv >= 360) {
         $this->ellipse($params);
     } else {
         $style = $this->_getLineStyle($lineColor) . $this->_getFillStyle($fillColor);
         if ($style != '') {
             $x1 = $x + $rx * cos(deg2rad(min($v1, $v2) % 360));
             $y1 = $y + $ry * sin(deg2rad(min($v1, $v2) % 360));
             $x2 = $x + $rx * cos(deg2rad(max($v1, $v2) % 360));
             $y2 = $y + $ry * sin(deg2rad(max($v1, $v2) % 360));
             $this->_addElement('<path d="' . 'M' . round($x) . ',' . round($y) . ' ' . 'L' . round($x1) . ',' . round($y1) . ' ' . 'A' . round($rx) . ',' . round($ry) . ($dv > 180 ? ' 0 1,1 ' : ' 0 0,1 ') . round($x2) . ',' . round($y2) . ' ' . 'Z" ' . 'style="' . $style . '"' . '/>', $params);
         }
         parent::pieslice($params);
     }
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:43,代码来源:SVG.php

示例3: pieslice

 /**
  * Draw a pie slice
  *
  * Parameter array:
  * 'x': int X center point
  * 'y': int Y center point
  * 'rx': int X radius
  * 'ry': int Y radius
  * 'v1': int The starting angle (in degrees)
  * 'v2': int The end angle (in degrees)
  * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut)
  * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut)
  * 'fill': mixed [optional] The fill color
  * 'line': mixed [optional] The line color
  * @param array $params Parameter array
  */
 function pieslice($params)
 {
     $x = $this->_getX($params['x']);
     $y = $this->_getY($params['y']);
     $rx = $this->_getX($params['rx']);
     $ry = $this->_getY($params['ry']);
     $v1 = $this->_getX($params['v1']);
     $v2 = $this->_getY($params['v2']);
     $srx = $this->_getX($params['srx']);
     $sry = $this->_getY($params['sry']);
     $fillColor = isset($params['fill']) ? $params['line'] : false;
     $lineColor = isset($params['line']) ? $params['line'] : false;
     // TODO Implement PDFLIB::pieSlice()
     parent::pieslice($params);
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:31,代码来源:PDF.php

示例4: pieslice

 /**
  * Draw a pie slice
  *
  * Parameter array:
  * 'x': int X center point
  * 'y': int Y center point
  * 'rx': int X radius
  * 'ry': int Y radius
  * 'v1': int The starting angle (in degrees)
  * 'v2': int The end angle (in degrees)
  * 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut)
  * 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut)
  * 'fill': mixed [optional] The fill color
  * 'line': mixed [optional] The line color
  * @param array $params Parameter array
  */
 function pieslice($params)
 {
     if (isset($params['url'])) {
         $x = $this->_getX($params['x']);
         $y = $this->_getY($params['y']);
         $rx = $params['rx'];
         $ry = $params['ry'];
         $v1a = $params['v1'];
         $v2a = $params['v2'];
         $v1 = min($v1a, $v2a);
         $v2 = max($v1a, $v2a);
         $srx = isset($params['srx']) ? $params['srx'] : 0;
         $sry = isset($params['sry']) ? $params['sry'] : 0;
         $points = round($x + $srx * cos(deg2rad($v1 % 360))) . ',' . round($y + $sry * sin(deg2rad($v1 % 360))) . ',';
         for ($v = $v1; $v < $v2; $v += 30) {
             $points .= round($x + $rx * cos(deg2rad($v % 360))) . ',' . round($y + $ry * sin(deg2rad($v % 360))) . ',';
         }
         $points .= round($x + $rx * cos(deg2rad($v2 % 360))) . ',' . round($y + $ry * sin(deg2rad($v2 % 360)));
         if ($srx != 0 || $sry != 0) {
             $points .= ',';
             for ($v = $v2; $v > $v1; $v -= 30) {
                 $points .= round($x + $srx * cos(deg2rad($v % 360))) . ',' . round($y + $sry * sin(deg2rad($v % 360))) . ',';
             }
         }
         $this->_addMapTag('polygon', $points, $params);
     }
     parent::pieslice($params);
 }
开发者ID:villos,项目名称:tree_admin,代码行数:44,代码来源:ImageMap.php


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