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


PHP Container::getImage方法代码示例

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


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

示例1: display

 /**
  * Method displaying the graphical segment.
  *
  * @param Container $container Image in which display the element
  * @param int $x_margin left margin
  * @param int $y_margin top margin
  * @return false if something wrong
  */
 function display($container, $x_margin = 0, $y_margin = 0)
 {
     $image = $container->getImage();
     $color = imagecolorallocate($image, $this->_r_color, $this->_g_color, $this->_b_color);
     // $white = imagecolorallocate($image, 255, 255, 255);
     $x1_margin = $this->_x1 + $this->_x_margin + $x_margin;
     $y1_margin = $this->_y1 + $this->_y_margin + $y_margin;
     // $ret = imagefilledellipse($image, $x1_margin, $y1_margin, $this->_size + 3, $this->_size + 3, $white);
     $ret = imagefilledellipse($image, $x1_margin, $y1_margin, $this->_size, $this->_size, $color);
     return $ret;
 }
开发者ID:madseller,项目名称:coperio,代码行数:19,代码来源:gpoint.php

示例2: display

 /**
  * Method displaying the graphical polygon.
  *
  * @param Container $container Image in which display the element
  * @param int $x_margin left margin
  * @param int $y_margin top margin
  * @return false if something wrong
  */
 function display($container, $x_margin = 0, $y_margin = 0)
 {
     $image = $container->getImage();
     $color = imagecolorallocate($image, $this->_r_color, $this->_g_color, $this->_b_color);
     $x_margin = $this->_x_margin + $x_margin;
     $y_margin = $this->_y_margin + $y_margin;
     $values = array();
     for ($i = 0; $i < count($this->_coordinates); $i = $i + 2) {
         $values[$i] = $this->_coordinates[$i] + $x_margin;
         $values[$i + 1] = $this->_coordinates[$i + 1] + $y_margin;
     }
     return imagefilledpolygon($image, $values, count($values) / 2, $color);
 }
开发者ID:madseller,项目名称:coperio,代码行数:21,代码来源:gpolygon.php

示例3: display

 /**
  * Method displaying the graphical segment.
  *
  * @param Container $container Image in which display the element
  * @param int $x_margin left margin
  * @param int $y_margin top margin
  * @return false if something wrong
  */
 function display($container, $x_margin = 0, $y_margin = 0)
 {
     $image = $container->getImage();
     $color = imagecolorallocate($image, $this->_r_color, $this->_g_color, $this->_b_color);
     $x1_margin = $this->_x1 + $this->_x_margin + $x_margin - $this->getXDistance();
     $y1_margin = $this->_y1 + $this->_y_margin + $y_margin - $this->getYDistance();
     return imagestring($image, $this->getFont(), $x1_margin, $y1_margin, $this->getText(), $color);
 }
开发者ID:madseller,项目名称:coperio,代码行数:16,代码来源:gstring.php

示例4: display

 /**
  * Method displaying the graphical segment.
  *
  * @param Container $container Image in which display the element
  * @param int $x_margin left margin
  * @param int $y_margin top margin
  * @return false if something wrong
  */
 function display($container, $x_margin = 0, $y_margin = 0)
 {
     $image = $container->getImage();
     $color = imagecolorallocate($image, $this->_r_color, $this->_g_color, $this->_b_color);
     $x1_margin = $this->_x1 + $this->_x_margin + $x_margin;
     $y1_margin = $this->_y1 + $this->_y_margin + $y_margin;
     $x2_margin = $this->_x2 + $this->_x_margin + $x_margin;
     $y2_margin = $this->_y2 + $this->_y_margin + $y_margin;
     $ret = imageline($image, $x1_margin, $y1_margin, $x2_margin, $y2_margin, $color);
     for ($i = 1; $i <= $this->_size; $i++) {
         $ret = $ret && imageline($image, $x1_margin + $i, $y1_margin, $x2_margin + $i, $y2_margin, $color);
         $ret = $ret && imageline($image, $x1_margin - $i, $y1_margin, $x2_margin - $i, $y2_margin, $color);
         $ret = $ret && imageline($image, $x1_margin, $y1_margin + $i, $x2_margin, $y2_margin + $i, $color);
         $ret = $ret && imageline($image, $x1_margin, $y1_margin - $i, $x2_margin, $y2_margin - $i, $color);
     }
     return $ret;
 }
开发者ID:madseller,项目名称:coperio,代码行数:25,代码来源:gsegment.php


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