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


PHP Image_Graph_Marker::_drawMarker方法代码示例

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


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

示例1:

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas
  * @param array $values The values representing the data the marker 'points' to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     $this->_getFillStyle();
     $this->_getLineStyle();
     $this->_canvas->rectangle(array('x0' => $x - $this->_size, 'y0' => $y - $this->_size, 'x1' => $x + $this->_size, 'y1' => $y + $this->_size));
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:jamesiarmes,项目名称:php-ups-api,代码行数:15,代码来源:Box.php

示例2:

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     $this->_getFillStyle();
     $this->_getLineStyle();
     $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y + $this->_size));
     $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size));
     $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y + $this->_size));
     $this->_canvas->polygon(array('connect' => true));
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:ronaldoof,项目名称:geocloud2,代码行数:21,代码来源:Triangle.php

示例3:

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     if (isset($values['AVERAGE_Y']) && is_a($this->_parent, 'Image_Graph_Plot')) {
         $point = $this->_pointXY(array('X' => $values['APX'], 'Y' => $values['AVERAGE_Y']));
         $this->_getLineStyle();
         $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $point['X'], 'y1' => $point['Y']));
         $this->_getLineStyle();
         $this->_canvas->line(array('x0' => $point['X'] - 2, 'y0' => $point['Y'], 'x1' => $point['X'] + 2, 'y1' => $point['Y']));
     }
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:ronaldoof,项目名称:geocloud2,代码行数:22,代码来源:Average.php

示例4: pi

 /**
  * Draw the marker on the canvas
  *
  * @param int   $x      The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int   $y      The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points' to
  *
  * @return void
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     $this->_getFillStyle();
     $this->_getLineStyle();
     $dA = 2 * pi() / ($this->_size * 2);
     $angle = 0;
     while ($angle < 2 * pi()) {
         $this->_canvas->addVertex(array('x' => $x + $this->_size * cos($angle), 'y' => $y - $this->_size * sin($angle)));
         $angle += $dA;
     }
     $this->_canvas->addVertex(array('x' => $x + $this->_size * cos(0), 'y' => $y - $this->_size * sin(0)));
     $this->_canvas->polygon(array('connect' => true));
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:richardmansfield,项目名称:richardms-mahara,代码行数:26,代码来源:Circle.php

示例5: round

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     $this->_getFillStyle();
     $this->_getLineStyle();
     $d = $this->_size / 5;
     $x = round($x);
     $y = round($y);
     $this->_canvas->addVertex(array('x' => $x, 'y' => $y - $this->_size));
     $this->_canvas->addVertex(array('x' => $x + round($d), 'y' => $y - round($d)));
     $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y - round($d)));
     $this->_canvas->addVertex(array('x' => $x + round(2 * $d), 'y' => $y + round($d)));
     $this->_canvas->addVertex(array('x' => $x + round(3 * $d), 'y' => $y + $this->_size));
     $this->_canvas->addVertex(array('x' => $x, 'y' => $y + round(3 * $d)));
     $this->_canvas->addVertex(array('x' => $x - round(3 * $d), 'y' => $y + $this->_size));
     $this->_canvas->addVertex(array('x' => $x - round(2 * $d), 'y' => $y + round($d)));
     $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y - round($d)));
     $this->_canvas->addVertex(array('x' => $x - round($d), 'y' => $y - round($d)));
     $this->_canvas->polygon(array('connect' => true));
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:31,代码来源:Star.php

示例6:

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     parent::_drawMarker($x, $y, $values);
     if ($this->_markerStart) {
         $this->_markerStart->_setParent($this);
         $this->_markerStart->_drawMarker($x, $y, $values);
     }
     $this->_getLineStyle();
     $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $this->_deltaX, 'y1' => $y + $this->_deltaY));
     $this->_markerEnd->_setParent($this);
     $this->_markerEnd->_drawMarker($x + $this->_deltaX, $y + $this->_deltaY, $values);
 }
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:23,代码来源:Pointing.php

示例7:

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     if ($this->_thickness > 0) {
         $this->_getLineStyle();
         $this->_getFillStyle();
         $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y - $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y - $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y - $this->_size));
         $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y - $this->_size));
         $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y - $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y - $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x + $this->_size, 'y' => $y + $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y + $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x + $this->_thickness, 'y' => $y + $this->_size));
         $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y + $this->_size));
         $this->_canvas->addVertex(array('x' => $x - $this->_thickness, 'y' => $y + $this->_thickness));
         $this->_canvas->addVertex(array('x' => $x - $this->_size, 'y' => $y + $this->_thickness));
         $this->_canvas->polygon(array('connect' => true));
     } else {
         $this->_getLineStyle();
         $this->_canvas->line(array('x0' => $x - $this->_size, 'y0' => $y, 'x1' => $x + $this->_size, 'y1' => $y));
         $this->_getLineStyle();
         $this->_canvas->line(array('x0' => $x, 'y0' => $y - $this->_size, 'x1' => $x, 'y1' => $y + $this->_size));
     }
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:37,代码来源:Plus.php

示例8: round

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas
  * @param array $values The values representing the data the marker 'points' to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     if ($this->_thickness > 0) {
         $this->_getLineStyle();
         $this->_getFillStyle();
         $d1 = round(0.7071067 * $this->_size);
         // cos/sin(45 de>)
         $d2 = round(0.7071067 * $this->_thickness);
         // cos/sin(45 deg)
         $this->_canvas->addVertex(array('x' => $x - $d1 - $d2, 'y' => $y - $d1 + $d2));
         $this->_canvas->addVertex(array('x' => $x - $d1 + $d2, 'y' => $y - $d1 - $d2));
         $this->_canvas->addVertex(array('x' => $x, 'y' => $y - 2 * $d2));
         $this->_canvas->addVertex(array('x' => $x + $d1 - $d2, 'y' => $y - $d1 - $d2));
         $this->_canvas->addVertex(array('x' => $x + $d1 + $d2, 'y' => $y - $d1 + $d2));
         $this->_canvas->addVertex(array('x' => $x + 2 * $d2, 'y' => $y));
         $this->_canvas->addVertex(array('x' => $x + $d1 + $d2, 'y' => $y + $d1 - $d2));
         $this->_canvas->addVertex(array('x' => $x + $d1 - $d2, 'y' => $y + $d1 + $d2));
         $this->_canvas->addVertex(array('x' => $x, 'y' => $y + 2 * $d2));
         $this->_canvas->addVertex(array('x' => $x - $d1 + $d2, 'y' => $y + $d1 + $d2));
         $this->_canvas->addVertex(array('x' => $x - $d1 - $d2, 'y' => $y + $d1 - $d2));
         $this->_canvas->addVertex(array('x' => $x - 2 * $d2, 'y' => $y));
         $this->_canvas->polygon(array('connect' => true));
     } else {
         $this->_getLineStyle();
         $this->_canvas->line(array('x0' => $x - $this->_size, 'y0' => $y - $this->_size, 'x1' => $x + $this->_size, 'y1' => $y + $this->_size));
         $this->_getLineStyle();
         $this->_canvas->line(array('x0' => $x + $this->_size, 'y0' => $y - $this->_size, 'x1' => $x - $this->_size, 'y1' => $y + $this->_size));
     }
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:38,代码来源:Cross.php

示例9: key

 /**
  * Draw the marker on the canvas
  *
  * @param int   $x      The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int   $y      The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points' to
  *
  * @return void
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     $ID = key($this->_markers);
     if (!next($this->_markers)) {
         reset($this->_markers);
     }
     $marker =& $this->_markers[$ID];
     if ($marker != null) {
         $marker->_drawMarker($x, $y, $values);
     }
     parent::_drawMarker($x, $y, $values);
 }
开发者ID:Magomogo,项目名称:Image_Graph,代码行数:24,代码来源:Array.php

示例10:

    /**
     * Draw the marker on the canvas
     * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas 
     * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas 
     * @param array $values The values representing the data the marker "points" to 
     * @access private
     */
    function _drawMarker($x, $y, $values = false)
    {
        parent::_drawMarker($x, $y, $values);

        $value = $this->_getDisplayValue($values);

        if ($this->_dataPreprocessor) {
            $value = $this->_dataPreprocessor->_process($value);
        }

        $this->_text = new Image_Graph_Text($x, $y, $value, $this->_font);
        $this->_text->setAlignment(IMAGE_GRAPH_ALIGN_CENTER);
        $this->add($this->_text);

        if ($this->_fillStyle) {
        	// Modified: Don't draw background
            //ImageFilledRectangle($this->_canvas(), $this->_fillLeft(), $this->_fillTop(), $this->_fillRight(), $this->_fillBottom(), $this->_getFillStyle());
        }

        if (isset($this->_borderStyle)) {            
        	// Modified: Don't draw a border
            //ImageRectangle($this->_canvas(), $this->_fillLeft(), $this->_fillTop(), $this->_fillRight(), $this->_fillBottom(), $this->_getBorderStyle());
        }

        $this->_text->_done();
    }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:33,代码来源:Value.php

示例11: reset

    /**
     * Draw the marker on the canvas
     * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas 
     * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas 
     * @param array $values The values representing the data the marker "points" to 
     * @access private
     */
    function _drawMarker($x, $y, $values = false)
    {
        if (!(list ($ID, $marker) = each($this->_markers))) {
            reset($this->_markers);
            list ($ID, $marker) = each($this->_markers);
        }
        $marker = & $this->_markers[$ID];

        if ($marker != null) {
            $marker->_drawMarker($x, $y, $values);
        }
        parent::_drawMarker($x, $y, $values);
    }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:20,代码来源:Array.php

示例12: array

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     parent::_drawMarker($x, $y, $values);
     if ($this->_filename) {
         $this->_canvas->image(array('x' => $x, 'y' => $y, 'filename' => $this->_filename, 'alignment' => array('horizontal' => 'center', 'vertical' => 'center')));
     }
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:18,代码来源:Icon.php

示例13: while

 /**
  * Draw the outline and the axis
  *
  * @access private
  */
 function _drawAxis()
 {
     //draw outline
     $this->_getLineStyle();
     $this->_canvas->pieslice(array('x' => $this->_centerX, 'y' => $this->_centerY, 'rx' => $this->_radius, 'ry' => $this->_radius, 'v1' => $this->_deg_offset, 'v2' => $this->_deg_offset + $this->_deg_width, 'srx' => $this->_radius * (1 - $this->_radiusPercent / 100), 'sry' => $this->_radius * (1 - $this->_radiusPercent / 100)));
     //step for every 6°
     $step = (int) ($this->_totalY / $this->_deg_width * 6);
     $value = $this->_value_min;
     $i = 0;
     while ($value <= $this->_value_max) {
         $angle = $this->_value2angle($value);
         $cos = cos(deg2rad($angle));
         $sin = sin(deg2rad($angle));
         $point = array('Y' => $value);
         $point['AX'] = $cos;
         $point['AY'] = $sin;
         $point['LENGTH'] = 1;
         $x = $this->_centerX + $this->_radius * $cos;
         $y = $this->_centerY + $this->_radius * $sin;
         $deltaX = -$cos * $this->_tickLength;
         $deltaY = -$sin * $this->_tickLength;
         $this->_getLineStyle();
         if ($i % $this->_axisTicks == 0) {
             $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $deltaX, 'y1' => $y + $deltaY));
             if ($this->_arrowMarker) {
                 $this->_arrowMarker->_drawMarker($x + $deltaX * 1.6, $y + $deltaY * 1.6, $point);
             }
         } else {
             $this->_canvas->line(array('x0' => $x, 'y0' => $y, 'x1' => $x + $deltaX * 0.5, 'y1' => $y + $deltaY * 0.5));
         }
         $i++;
         $value += $step;
     }
 }
开发者ID:villos,项目名称:tree_admin,代码行数:39,代码来源:Odo.php

示例14:

 /**
  * Draw the marker on the canvas
  *
  * @param int $x The X (horizontal) position (in pixels) of the marker on
  *   the canvas
  * @param int $y The Y (vertical) position (in pixels) of the marker on the
  *   canvas
  * @param array $values The values representing the data the marker 'points'
  *   to
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     parent::_drawMarker($x, $y, $values);
     $value = $this->_getDisplayValue($values);
     if ($this->_dataPreprocessor) {
         $value = $this->_dataPreprocessor->_process($value);
     }
     if ($this->_defaultFontOptions !== false) {
         $this->_canvas->setFont($this->_defaultFontOptions);
     } else {
         $this->_canvas->setFont($this->_getFont());
     }
     $width = $this->_canvas->textWidth($value);
     $height = $this->_canvas->textHeight($value);
     $offsetX = $width / 2 + $this->_padding['left'];
     $offsetY = $height / 2 + $this->_padding['top'];
     $this->_getFillStyle();
     $this->_getBorderStyle();
     $this->_canvas->rectangle(array('x0' => $x - $offsetX, 'y0' => $y - $offsetY, 'x1' => $x + $offsetX, 'y1' => $y + $offsetY));
     $this->write($x, $y, $value, IMAGE_GRAPH_ALIGN_CENTER);
 }
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:32,代码来源:Value.php

示例15:

 /**
  * Draw the marker on the canvas
  * @param int $x The X (horizontal) position (in pixels) of the marker on the canvas 
  * @param int $y The Y (vertical) position (in pixels) of the marker on the canvas 
  * @param array $values The values representing the data the marker "points" to 
  * @access private
  */
 function _drawMarker($x, $y, $values = false)
 {
     parent::_drawMarker($x, $y, $values);
     if ($this->_markerStart) {
         $this->_markerStart->_drawMarker($x, $y, $values);
     }
     // Modified: Don't draw pointer if line thickness is zero
     if ($this->_getLineStyle() != 0) ImageLine($this->_canvas(), $x, $y, $x + $this->_deltaX, $y + $this->_deltaY, $this->_getLineStyle());
     $this->_markerEnd->_drawMarker($x + $this->_deltaX, $y + $this->_deltaY, $values);
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:Pointing.php


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