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


PHP imagestringup函数代码示例

本文整理汇总了PHP中imagestringup函数的典型用法代码示例。如果您正苦于以下问题:PHP imagestringup函数的具体用法?PHP imagestringup怎么用?PHP imagestringup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: draw_bar_graph

function draw_bar_graph($width, $height, $data, $max_value, $filename)
{
    // Create the empty graph image
    $img = imagecreatetruecolor($width, $height);
    // Set a white background with black text and gray graphics
    $bg_color = imagecolorallocate($img, 255, 255, 255);
    // white
    $text_color = imagecolorallocate($img, 255, 255, 255);
    // white
    $bar_color = imagecolorallocate($img, 0, 0, 0);
    // black
    $border_color = imagecolorallocate($img, 192, 192, 192);
    // light gray
    // Fill the background
    imagefilledrectangle($img, 0, 0, $width, $height, $bg_color);
    // Draw the bars
    $bar_width = $width / (count($data) * 2 + 1);
    for ($i = 0; $i < count($data); $i++) {
        imagefilledrectangle($img, $i * $bar_width * 2 + $bar_width, $height, $i * $bar_width * 2 + $bar_width * 2, $height - $height / $max_value * $data[$i][1], $bar_color);
        imagestringup($img, 5, $i * $bar_width * 2 + $bar_width, $height - 5, $data[$i][0], $text_color);
    }
    // Draw a rectangle around the whole thing
    imagerectangle($img, 0, 0, $width - 1, $height - 1, $border_color);
    // Draw the range up the left side of the graph
    for ($i = 1; $i <= $max_value; $i++) {
        imagestring($img, 5, 0, $height - $i * ($height / $max_value), $i, $bar_color);
    }
    // Write the graph image to a file
    imagepng($img, $filename, 5);
    imagedestroy($img);
}
开发者ID:khk0613,项目名称:YHK,代码行数:31,代码来源:mymismatch.php

示例2: draw_bar_graph

function draw_bar_graph($width, $height, $data, $max_value, $filename)
{
    /*1. Create the empty graph image*/
    $img = imagecreatetruecolor($width, $height);
    /*2. set a white background with black text and gray graphic*/
    $bg_color = imagecolorallocate($img, 255, 255, 255);
    //white
    $text_color = imagecolorallocate($img, 255, 255, 255);
    $bar_color = imagecolorallocate($img, 0, 0, 0);
    //black
    $border_color = imagecolorallocate($img, 192, 192, 192);
    //light gray
    /*3. fill the background */
    imagefilledrectangle($img, 0, 0, $width, $height, $bg_color);
    /*4. Draw the bars */
    $bar_width = $width / (count($data) * 2 + 1);
    for ($i = 0; $i < count($data); $i++) {
        imagefilledrectangle($img, $i * $bar_width * 2 + $bar_width, $height, $i * $bar_width * 2 + $bar_width * 2, $height - $height / $max_value * $data[$i][1], $bar_color);
        imagestringup($img, 5, $i * $bar_width * 2 + $bar_width, $height - 5, $data[$i][0], $text_color);
    }
    /*5. Draw a rectangle around the whole thing*/
    imagerectangle($img, 0, 0, $width - 1, $height - 1, $border_color);
    /*6. Draw the range up the left side of graph*/
    for ($i = 1; $i <= $max_value; $i++) {
        imagestring($img, 5, 0, $height - $i * ($height / $max_value), $i, $bar_color);
    }
    /*7. output image to a file.*/
    imagepng($img, $filename, 5);
    /*8. destroy image.*/
    imagedestroy($img);
}
开发者ID:jekin000,项目名称:hf_php,代码行数:31,代码来源:bar.php

示例3: getGDImageOfMemoryLine

 public function getGDImageOfMemoryLine(Watcher $Watcher, $width, $height, $y_scale = 1, $memory_size_scale = 1048576)
 {
     $points = $Watcher->getPointsArray();
     if (empty($points) || empty($y_scale) || empty($memory_size_scale)) {
         return false;
     }
     $max_y = $height;
     $max_x = $width;
     $img = imagecreatetruecolor($max_x, $max_y);
     $point_color = imagecolorallocate($img, 0, 0, 255);
     $line_color = imagecolorallocate($img, 0, 255, 0);
     $string_color = imagecolorallocate($img, 0, 0, 0);
     $white = imagecolorallocate($img, 255, 255, 255);
     imagefill($img, 10, 10, $white);
     $x = 0;
     $y = 0;
     $x_step = intval($max_x / 100);
     foreach ($points as $point) {
         $value = round($point[$Watcher::point_memory] / $memory_size_scale, 2);
         $new_x = $x + $x_step;
         $new_y = $value * $y_scale;
         imageline($img, $x + 1, $max_y - $y, $new_x, $max_y - $new_y, $line_color);
         $x = $new_x;
         $y = $new_y;
         imagesetpixel($img, $x, $max_y - $y, $point_color);
         imagestringup($img, 1, $x, $max_y - $y - 5, $point[$Watcher::point_name], $string_color);
         imagestringup($img, 1, $x, $max_y - $y + 30, $value, $string_color);
     }
     return $img;
 }
开发者ID:jamm,项目名称:errorhandler,代码行数:30,代码来源:WatchPointsPrinter.php

示例4: getCanvas

 public function getCanvas()
 {
     $date = zbx_date2str(DATE_TIME_FORMAT_SECONDS);
     imagestring($this->canvas, 1, $this->width - 120, $this->height - 12, $date, $this->getColor('gray'));
     imagestringup($this->canvas, 1, $this->width - 10, $this->height - 50, ZABBIX_HOMEPAGE, $this->getColor('gray'));
     return $this->canvas;
 }
开发者ID:TonywalkerCN,项目名称:Zabbix,代码行数:7,代码来源:CCanvas.php

示例5: getCanvas

 public function getCanvas()
 {
     $grey = get_color($this->canvas, '969696', 50);
     $date = zbx_date2str(DATE_TIME_FORMAT_SECONDS);
     imagestring($this->canvas, 1, $this->width - 120, $this->height - 12, $date, $grey);
     imagestringup($this->canvas, 1, $this->width - 10, $this->height - 50, ZABBIX_HOMEPAGE, $grey);
     return $this->canvas;
 }
开发者ID:jbfavre,项目名称:debian-zabbix,代码行数:8,代码来源:CCanvas.php

示例6: vtext

 private function vtext($x, $y, $text, $color)
 {
     if ($x < 0) {
         $x = $this->width + $x;
     }
     if ($y < 0) {
         $y = $this->height + $y;
     }
     imagestringup($this->img, 2, $x, $y, $text, $color);
 }
开发者ID:laiello,项目名称:xiv,代码行数:10,代码来源:graph.php

示例7: FilledArc

function FilledArc(&$im, $CenterX, $CenterY, $DiameterX, $DiameterY, $Start, $End, $line_color, $fill_color='none',$key='') 
	{
	ImageArc($im, $CenterX, $CenterY, $DiameterX, $DiameterY, $Start, $End, $line_color);
	// To close the arc with 2 lines between the center and the 2 limits of the arc 
	$x = $CenterX + (cos(deg2rad($Start)) * ($DiameterX / 2)); 
	$y = $CenterY + (sin(deg2rad($Start)) * ($DiameterY / 2)); 
	ImageLine($im, $x, $y, $CenterX, $CenterY, $line_color); 
	$x = $CenterX + (cos(deg2rad($End)) * ($DiameterX / 2)); 
	$y = $CenterY + (sin(deg2rad($End)) * ($DiameterY / 2)); 
	ImageLine($im, $x, $y, $CenterX, $CenterY, $line_color); 
	// To fill the arc, the starting point is a point in the middle of the closed space 
	$x = $CenterX + (cos(deg2rad(($Start + $End) / 2)) * ($DiameterX / 4)); 
	$y = $CenterY + (sin(deg2rad(($Start + $End) / 2)) * ($DiameterY / 4)); 
	ImageFillToBorder($im, $x, $y, $line_color, $fill_color);
	
	// Ainda faltam vários ajustes para escrita do label na vertical... Anderson Peterle => 08/08/2007
	if ($key)
		imagestringup($im,2,$x,$y,$key,$x);
	}
开发者ID:GabrielDiniz,项目名称:FluxNetControl,代码行数:19,代码来源:piechart.php

示例8: createImage

function createImage($data, $twidth, $tspace, $height)
{
    $dataName = array();
    $dataValue = array();
    $i = 0;
    $j = 0;
    $k = 0;
    $num = sizeof($data);
    foreach ($data as $key => $val) {
        $dataName[] = $key;
        $dataValue[] = $val;
    }
    $maxnum = max($data);
    $width = ($twidth + $tspace) * $num + 4;
    //image's width
    $im = imagecreate($width + 40, $height + 20);
    $lineColor = imagecolorallocate($im, 12, 12, 12);
    $bgColor = imagecolorallocate($im, 255, 233, 233);
    $tColor = imagecolorallocate($im, 123, 200, 56);
    imagefill($im, 0, 0, $bgColor);
    imageline($im, 30, 0, 30, $height - 2, $lineColor);
    imageline($im, 30, $height - 2, $width + 30 - 2, $height - 2, $lineColor);
    while ($i < $num) {
        imagefilledrectangle($im, $i * ($tspace + $twidth) + 40, $height - $dataValue[$i], $i * ($tspace + $twidth) + 40 + $twidth, $height - 3, $tColor);
        imagestringup($im, 4, $i * ($tspace + $twidth) + $twidth / 2 + 30, $height - 10, $dataName[$i] . "(" . $dataValue[$i] . ")", $lineColor);
        $i++;
    }
    while ($j <= 500 / 10) {
        imagestringup($im, 4, 2, $height - $j * 10 + 10, $j * 10, $lineColor);
        $j = $j + 10;
    }
    while ($k <= 500 / 10) {
        if ($k != 0) {
            imageline($im, 28, $height - $k * 10, 32, $height - $k * 10, $lineColor);
        }
        $k = $k + 10;
    }
    imagepng($im);
}
开发者ID:chaobj001,项目名称:tt,代码行数:39,代码来源:createimage.php

示例9: _drawData

 private function _drawData()
 {
     $x = 0;
     $y0 = $this->_getY(0);
     foreach ($this->_data as $key => $item) {
         $y = $this->_getY($item['value']);
         imagefilledrectangle($this->_img, $x, $y0, $x + $this->_item_width, $y, 0x6564ff);
         imagerectangle($this->_img, $x, $y0, $x + $this->_item_width, $y, 0x4a49c0);
         if ($this->_text_dir == 'vertical') {
             imagestringup($this->_img, 2, $x + 3, $y - 3, number_format($item['value']), 0x4a49c0);
             imagestringup($this->_img, 2, $x + 3, 299, str_pad($item['label'], 16, ' ', STR_PAD_LEFT), 0x333333);
         } else {
             $text_len_px = strlen(number_format($item['value'])) * 7;
             $text_x = $x + ($this->_item_width - $text_len_px) / 2;
             imagestring($this->_img, 2, $text_x, $y - 13, number_format($item['value']), 0x4a49c0);
             $text_len_px = strlen($item['label']) * 7;
             $text_x = $x + ($this->_item_width - $text_len_px) / 2;
             imagestring($this->_img, 2, $text_x, 289, $item['label'], 0x333333);
         }
         $x += $this->_item_width;
     }
 }
开发者ID:Albertoni,项目名称:GFUserDatabase,代码行数:22,代码来源:Graph.class.php

示例10: draw_graph

function draw_graph($category_array, $width, $height, $max_value, $filename)
{
    $img = imagecreatetruecolor($width, $height);
    $bg_color = imagecolorallocate($img, 255, 255, 255);
    // white
    $text_color = imagecolorallocate($img, 255, 255, 255);
    // white
    $bar_color = imagecolorallocate($img, 0, 0, 0);
    // black
    $border_color = imagecolorallocate($img, 192, 192, 192);
    // light gray
    imagefilledrectangle($img, 0, 0, $width, $height, $bg_color);
    $bar_width = $width / (count($category_array) * 2 + 1);
    for ($i = 0; $i < count($category_array); $i++) {
        imagefilledrectangle($img, $i * $bar_width * 2 + $bar_width, $height, $i * $bar_width * 2 + $bar_width * 2, $height - $height / $max_value * $category_array[$i][1], $bar_color);
        imagestringup($img, 5, $i * $bar_width * 2 + $bar_width, $height - 5, $category_array[$i][0], $text_color);
    }
    imagerectangle($img, 0, 0, $width - 1, $height - 1, $border_color);
    for ($i = 1; $i <= $max_value; $i++) {
        imagestring($img, 5, 0, $height - $i * ($height / $max_value), $i, $bar_color);
    }
    imagepng($img, $filename, 5);
    imagedestroy($img);
}
开发者ID:sgreenholtz,项目名称:php_course_work,代码行数:24,代码来源:bar_graph.php

示例11: _StrokeBuiltinFont

 function _StrokeBuiltinFont($x, $y, $txt, $dir = 0, $paragraph_align = "left", &$aBoundingBox, $aDebug = false)
 {
     if (is_numeric($dir) && $dir != 90 && $dir != 0) {
         JpGraphError::RaiseL(25091);
     }
     //(" Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.");
     $h = $this->GetTextHeight($txt);
     $fh = $this->GetFontHeight();
     $w = $this->GetTextWidth($txt);
     if ($this->text_halign == "right") {
         $x -= $dir == 0 ? $w : $h;
     } elseif ($this->text_halign == "center") {
         // For center we subtract 1 pixel since this makes the middle
         // be prefectly in the middle
         $x -= $dir == 0 ? $w / 2 - 1 : $h / 2;
     }
     if ($this->text_valign == "top") {
         $y += $dir == 0 ? $h : $w;
     } elseif ($this->text_valign == "center") {
         $y += $dir == 0 ? $h / 2 : $w / 2;
     }
     if ($dir == 90) {
         imagestringup($this->img, $this->font_family, $x, $y, $txt, $this->current_color);
         $aBoundingBox = array(round($x), round($y), round($x), round($y - $w), round($x + $h), round($y - $w), round($x + $h), round($y));
         if ($aDebug) {
             // Draw bounding box
             $this->PushColor('green');
             $this->Polygon($aBoundingBox, true);
             $this->PopColor();
         }
     } else {
         if (ereg("\n", $txt)) {
             $tmp = split("\n", $txt);
             for ($i = 0; $i < count($tmp); ++$i) {
                 $w1 = $this->GetTextWidth($tmp[$i]);
                 if ($paragraph_align == "left") {
                     imagestring($this->img, $this->font_family, $x, $y - $h + 1 + $i * $fh, $tmp[$i], $this->current_color);
                 } elseif ($paragraph_align == "right") {
                     imagestring($this->img, $this->font_family, $x + ($w - $w1), $y - $h + 1 + $i * $fh, $tmp[$i], $this->current_color);
                 } else {
                     imagestring($this->img, $this->font_family, $x + $w / 2 - $w1 / 2, $y - $h + 1 + $i * $fh, $tmp[$i], $this->current_color);
                 }
             }
         } else {
             //Put the text
             imagestring($this->img, $this->font_family, $x, $y - $h + 1, $txt, $this->current_color);
         }
         if ($aDebug) {
             // Draw the bounding rectangle and the bounding box
             $p1 = array(round($x), round($y), round($x), round($y - $h), round($x + $w), round($y - $h), round($x + $w), round($y));
             // Draw bounding box
             $this->PushColor('green');
             $this->Polygon($p1, true);
             $this->PopColor();
         }
         $aBoundingBox = array(round($x), round($y), round($x), round($y - $h), round($x + $w), round($y - $h), round($x + $w), round($y));
     }
 }
开发者ID:giovanny751,项目名称:sst,代码行数:58,代码来源:gd_image.inc.php

示例12: _drawAxes

 /**
  * Draw X and Y axes
  *
  * @return	@e void
  */
 protected function _drawAxes()
 {
     //-----------------------------------------
     // Allocate text and shadow cols
     //-----------------------------------------
     $textcolor = imagecolorallocate($this->image, hexdec(substr($this->options['titlecolor'], 1, 2)), hexdec(substr($this->options['titlecolor'], 3, 2)), hexdec(substr($this->options['titlecolor'], 5, 2)));
     $shadowcolor = imagecolorallocate($this->image, hexdec(substr($this->options['titleshadow'], 1, 2)), hexdec(substr($this->options['titleshadow'], 3, 2)), hexdec(substr($this->options['titleshadow'], 5, 2)));
     //-----------------------------------------
     // Do we have axes titles?
     //-----------------------------------------
     if ($this->options['xaxistitle']) {
         if ($this->use_ttf) {
             $txtsize = imagettfbbox(10, 0, $this->options['font'], $this->options['xaxistitle']);
             $textx = round(($this->grapharea['x1'] - $this->grapharea['x0']) / 2, 0) - round(($txtsize[4] - $txtsize[0]) / 2, 0);
             $texty = $this->grapharea['y1'];
             imagettftext($this->image, 10, 0, $textx + 1, $texty + 1, $shadowcolor, $this->options['font'], $this->options['xaxistitle']);
             imagettftext($this->image, 10, 0, $textx, $texty, $textcolor, $this->options['font'], $this->options['xaxistitle']);
             $this->grapharea['y1'] = $this->grapharea['y1'] - ($txtsize[1] - $txtsize[5]) - 5;
         } else {
             $txtwidth = imagefontwidth($this->fontsize) * strlen($this->options['xaxistitle']);
             $textx = round(($this->grapharea['x1'] - $this->grapharea['x0']) / 2, 0) - round($txtwidth / 2, 0);
             $texty = $this->grapharea['y1'] - imagefontheight($this->fontsize);
             imagestring($this->image, $this->fontsize, $textx + 1, $texty + 1, $this->options['xaxistitle'], $shadowcolor);
             imagestring($this->image, $this->fontsize, $textx, $texty, $this->options['xaxistitle'], $textcolor);
             $this->grapharea['y1'] = $this->grapharea['y1'] - imagefontheight($this->fontsize) - 5;
         }
     }
     if ($this->options['yaxistitle']) {
         if ($this->use_ttf) {
             $txtsize = imagettfbbox(10, 0, $this->options['font'], $this->options['yaxistitle']);
             $textx = $this->grapharea['x0'] + ($txtsize[1] - $txtsize[5]);
             $texty = round(($this->grapharea['y1'] - $this->grapharea['y0']) / 2, 0) + ($txtsize[4] - $txtsize[0]);
             imagettftext($this->image, 10, 90, $textx + 1, $texty + 1, $shadowcolor, $this->options['font'], $this->options['yaxistitle']);
             imagettftext($this->image, 10, 90, $textx, $texty, $textcolor, $this->options['font'], $this->options['yaxistitle']);
             $this->grapharea['x0'] = $textx + 5;
         } else {
             $txtheight = imagefontwidth($this->fontsize) * strlen($this->options['yaxistitle']);
             $textx = $this->grapharea['x0'];
             $texty = round(($this->grapharea['y1'] - $this->grapharea['y0']) / 2, 0) + round($txtheight / 2, 0);
             imagestringup($this->image, $this->fontsize, $textx + 1, $texty + 1, $this->options['yaxistitle'], $shadowcolor);
             imagestringup($this->image, $this->fontsize, $textx, $texty, $this->options['yaxistitle'], $textcolor);
             $this->grapharea['x0'] = $this->grapharea['x0'] + imagefontheight($this->fontsize) + 5;
         }
     }
     //-----------------------------------------
     // Determine height of the x-axis
     //-----------------------------------------
     $xaxisheight = 0;
     if (isset($this->x_axis['type'])) {
         if ($this->x_axis['type'] == 'numeric') {
             if ($this->use_ttf) {
                 $txtsize = imagettfbbox(10, 0, $this->options['font'], $this->x_axis['max']);
                 $xaxisheight = $txtsize[1] - $txtsize[5];
             } else {
                 $xaxisheight = imagefontheight($this->fontsize);
             }
         } else {
             $xaxisheight = 0;
             foreach ($this->x_axis['labels'] as $label) {
                 if ($this->use_ttf) {
                     $textsize = imagettfbbox(10, 45, $this->options['font'], $label);
                     if ($textsize[1] - $textsize[5] > $xaxisheight) {
                         $xaxisheight = $textsize[1] - $textsize[5];
                     }
                 } else {
                     $textsize = imagefontwidth($this->fontsize) * strlen($label);
                     if ($textsize > $xaxisheight) {
                         $xaxisheight = $textsize;
                     }
                 }
             }
         }
         $xaxisheight += 8;
         $this->grapharea['y1'] -= $xaxisheight;
     }
     //-----------------------------------------
     // Determine width of the y-axis
     //-----------------------------------------
     $yaxiswidth = 0;
     if (isset($this->y_axis['type'])) {
         if ($this->y_axis['type'] == 'numeric') {
             if ($this->use_ttf) {
                 $txtsize = imagettfbbox(10, 0, $this->options['font'], $this->y_axis['max']);
                 $yaxiswidth = $txtsize[2] - $txtsize[0];
             } else {
                 $yaxiswidth = imagefontwidth($this->fontsize) * strlen($this->y_axis['max']);
             }
         } else {
             $yaxiswidth = 0;
             foreach ($this->y_axis['labels'] as $label) {
                 if ($this->use_ttf) {
                     $textsize = imagettfbbox(10, 0, $this->options['font'], $label);
                     if ($textsize[2] - $textsize[0] > $yaxiswidth) {
                         $yaxiswidth = $textsize[2] - $textsize[0];
                     }
//.........这里部分代码省略.........
开发者ID:mover5,项目名称:imobackup,代码行数:101,代码来源:classGraph.php

示例13: writestrup

 public function writestrup($str)
 {
     // add by new network http://necz.net
     $b = imagecolorallocate($this->workingImage, 0, 0, 0);
     $w = imagecolorallocate($this->workingImage, 255, 255, 255);
     $len = strlen($str) * 6;
     $wa = imagesx($this->workingImage) - 14;
     imagestringup($this->workingImage, 2, $wa + 1, $len, $str, $b);
     imagestringup($this->workingImage, 2, $wa - 1, $len, $str, $b);
     imagestringup($this->workingImage, 2, $wa, $len + 1, $str, $b);
     imagestringup($this->workingImage, 2, $wa, $len - 1, $str, $b);
     imagestringup($this->workingImage, 2, $wa, $len, $str, $w);
     $this->oldImage = $this->workingImage;
     return $this;
 }
开发者ID:anugool,项目名称:php-news,代码行数:15,代码来源:GdThumb.inc.php

示例14: foreach

    foreach ($per_host as $index => $percent) {
        $week_day++;
        if ($week_day > 6) {
            $week_day -= 7;
        }
        if ($index / 2 == (int) ($index / 2)) {
            $color = imageColorAllocate($img, 249, 243, 70);
            $color2 = imageColorAllocate($img, 242, 226, 42);
            $color3 = imageColorAllocate($img, 226, 210, 34);
        } else {
            $color = imageColorAllocate($img, 11, 215, 252);
            $color2 = imageColorAllocate($img, 7, 203, 239);
            $color3 = imageColorAllocate($img, 7, 187, 219);
        }
        $y1 = round($imageW - $imageW * $percent + 12);
        imageFilledRectangle($img, $x1, $y1, $x2, $y2, $color);
        $points = array(0 => $x1, 1 => $y1, 2 => $x1 + 3, 3 => $y1 - 5, 4 => $x1 + $collW + 3, 5 => $y1 - 5, 6 => $x2, 7 => $y1);
        imageFilledPolygon($img, $points, 4, $color2);
        $points = array(0 => $x2, 1 => $y1, 2 => $x1 + $collW + 3, 3 => $y1 - 5, 4 => $x1 + $collW + 3, 5 => $y2 - 5, 6 => $x2, 7 => $y2);
        imageFilledPolygon($img, $points, 4, $color3);
        // imageTTFtext($img, 7, 90, $x1+8, 50, $colorBlack, BASEDIR.'/assets/fonts/font.ttf', $host_data[$index]);
        imagestringup($img, 1, $x1 + 3, 52, $host_data[$index], $colorBlack);
        imageTTFtext($img, 6, 0, $x1 + 3, 66, $colorBlack, BASEDIR . '/assets/fonts/font.ttf', $arr_week[$week_day]);
        $x1 += $collW;
        $x2 += $collW;
    }
    //Header("Content-type: image/gif");
    ImageGIF($img, BASEDIR . $imagecache);
    ImageDestroy($img);
}
echo '<img src="' . $imagecache . '?' . date_fixed(SITETIME, "dmY") . '" alt="Неделя" /><br /><br />';
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:counter7.php

示例15: imagefilledrectangle

        imagefilledrectangle($im, $x1 + $shiftX, $yt + $shiftYup, $x1 + $shiftX + 8, $yt + $yu + $shiftYup, imagecolorallocate($im, 235, 235, 235));
    }
    // UNKNOWN
    $yf = $sizeY * $false[$i] / 100;
    if ($yf > 0) {
        imagefilledrectangle($im, $x1 + $shiftX, $yt + $yu + $shiftYup, $x1 + $shiftX + 8, $sizeY + $shiftYup, imagecolorallocate($im, 120, 235, 120));
    }
    // GREEN
    //SDI($yt.'+'.$yf.'+'.$yu);
    if ($yt + $yf + $yu > 0) {
        imagerectangle($im, $x1 + $shiftX, $shiftYup, $x1 + $shiftX + 8, $sizeY + $shiftYup, $black);
    }
}
for ($i = 0; $i <= $sizeY; $i += $sizeY / 10) {
    imagestring($im, 1, $sizeX + 5 + $shiftX, $sizeY - $i - 4 + $shiftYup, $i * ($maxY - $minY) / $sizeY + $minY, $darkred);
}
imagefilledrectangle($im, $shiftX, $sizeY + $shiftYup + 39 + 15 * 0, $shiftX + 5, $sizeY + $shiftYup + 35 + 9 + 15 * 0, imagecolorallocate($im, 120, 235, 120));
imagerectangle($im, $shiftX, $sizeY + $shiftYup + 39 + 15 * 0, $shiftX + 5, $sizeY + $shiftYup + 35 + 9 + 15 * 0, $black);
imagestring($im, 2, $shiftX + 9, $sizeY + $shiftYup + 15 * 0 + 35, 'FALSE (%)', $black);
imagefilledrectangle($im, $shiftX, $sizeY + $shiftYup + 39 + 15 * 1, $shiftX + 5, $sizeY + $shiftYup + 35 + 9 + 15 * 1, imagecolorallocate($im, 235, 120, 120));
imagerectangle($im, $shiftX, $sizeY + $shiftYup + 39 + 15 * 1, $shiftX + 5, $sizeY + $shiftYup + 15 + 9 + 35 * 1, $black);
imagestring($im, 2, $shiftX + 9, $sizeY + $shiftYup + 15 * 1 + 35, 'TRUE (%)', $black);
imagefilledrectangle($im, $shiftX, $sizeY + $shiftYup + 39 + 15 * 2, $shiftX + 5, $sizeY + $shiftYup + 35 + 9 + 15 * 2, imagecolorallocate($im, 220, 220, 220));
imagerectangle($im, $shiftX, $sizeY + $shiftYup + 39 + 15 * 2, $shiftX + 5, $sizeY + $shiftYup + 35 + 9 + 15 * 2, $black);
imagestring($im, 2, $shiftX + 9, $sizeY + $shiftYup + 15 * 2 + 35, 'UNKNOWN (%)', $black);
imagestringup($im, 0, imagesx($im) - 10, imagesy($im) - 50, 'http://www.zabbix.com', $gray);
$end_time = time(NULL);
imagestring($im, 0, imagesx($im) - 100, imagesy($im) - 12, 'Generated in ' . ($end_time - $start_time) . ' sec', $gray);
ImageOut($im);
imagedestroy($im);
include_once 'include/page_footer.php';
开发者ID:rennhak,项目名称:zabbix,代码行数:31,代码来源:chart4.php


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