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


PHP ezcGraphRenderer::drawBox方法代码示例

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


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

示例1: render

 /**
  * Render the text
  * 
  * @param ezcGraphRenderer $renderer Renderer
  * @param ezcGraphBoundings $boundings Boundings for the axis
  * @return ezcGraphBoundings Remaining boundings
  */
 public function render(ezcGraphRenderer $renderer, ezcGraphBoundings $boundings)
 {
     $height = (int) min(round($this->properties['maxHeight'] * ($boundings->y1 - $boundings->y0)), $this->properties['font']->maxFontSize + $this->padding * 2 + $this->margin * 2);
     switch ($this->properties['position']) {
         case ezcGraph::TOP:
             $textBoundings = new ezcGraphBoundings($boundings->x0, $boundings->y0, $boundings->x1, $boundings->y0 + $height);
             $boundings->y0 += $height + $this->properties['margin'];
             break;
         case ezcGraph::BOTTOM:
             $textBoundings = new ezcGraphBoundings($boundings->x0, $boundings->y1 - $height, $boundings->x1, $boundings->y1);
             $boundings->y1 -= $height + $this->properties['margin'];
             break;
     }
     $textBoundings = $renderer->drawBox($textBoundings, $this->properties['background'], $this->properties['border'], $this->properties['borderWidth'], $this->properties['margin'], $this->properties['padding']);
     $renderer->drawText($textBoundings, $this->properties['title'], ezcGraph::CENTER | ezcGraph::MIDDLE);
     return $boundings;
 }
开发者ID:mediasadc,项目名称:alba,代码行数:24,代码来源:text.php

示例2: render

 /**
  * Render the background
  *
  * @param ezcGraphRenderer $renderer Renderer
  * @param ezcGraphBoundings $boundings Boundings
  * @return ezcGraphBoundings Remaining boundings
  */
 public function render(ezcGraphRenderer $renderer, ezcGraphBoundings $boundings)
 {
     $boundings = $renderer->drawBox($boundings, $this->background, $this->border, $this->borderWidth, $this->margin, $this->padding);
     if ($this->image === false) {
         return $boundings;
     }
     $renderer->drawBackgroundImage($boundings, $this->image, $this->position, $this->repeat);
     return $boundings;
 }
开发者ID:ODM-Matt,项目名称:phpUnderControl-UNMAINTAINED,代码行数:16,代码来源:background.php

示例3: render

 /**
  * Render a legend
  * 
  * @param ezcGraphRenderer $renderer Renderer
  * @param ezcGraphBoundings $boundings Boundings for the axis
  * @return ezcGraphBoundings Remaining boundings
  */
 public function render(ezcGraphRenderer $renderer, ezcGraphBoundings $boundings)
 {
     $boundings = $this->calculateBoundings($boundings);
     if ($this->position === ezcGraph::LEFT || $this->position === ezcGraph::RIGHT) {
         $type = ezcGraph::VERTICAL;
     } else {
         $type = ezcGraph::HORIZONTAL;
     }
     // Render standard elements
     $this->properties['boundings'] = $renderer->drawBox($this->properties['boundings'], $this->properties['background'], $this->properties['border'], $this->properties['borderWidth'], $this->properties['margin'], $this->properties['padding'], $this->properties['title'], $this->getTitleSize($this->properties['boundings'], $type));
     // Render legend
     $renderer->drawLegend($this->boundings, $this, $type);
     return $boundings;
 }
开发者ID:ODM-Matt,项目名称:phpUnderControl-UNMAINTAINED,代码行数:21,代码来源:legend.php


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