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


PHP pImage::stroke方法代码示例

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


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

示例1: displayWeb

 /**
  * Main display method for the web interface.
  * @param boolean $supress_output
  */
 protected function displayWeb($supress_output = false)
 {
     $this->completeChart();
     if (!$supress_output) {
         $this->chartImage->stroke();
     }
 }
开发者ID:apelon-ohie,项目名称:ihris-site,代码行数:11,代码来源:I2CE_PagePChart.php

示例2: index

 function index()
 {
     /* Create and populate the pData object */
     $MyData = new pData();
     $MyData->addPoints(getGenders($this->db), "ScoreA");
     $MyData->setSerieDescription("ScoreA", "Application A");
     /* Define the absissa serie */
     $MyData->addPoints(array("Female", "Male"), "Labels");
     $MyData->setAbscissa("Labels");
     /* Create the pChart object */
     $myPicture = new pImage(240, 180, $MyData, TRUE);
     /* Set the default font properties */
     $myPicture->setFontProperties(array("FontName" => pClass . "fonts/Forgotte.ttf", "FontSize" => 10, "R" => 80, "G" => 80, "B" => 80));
     /* Create the pPie object */
     $PieChart = new pPie($myPicture, $MyData);
     /* Enable shadow computing */
     $myPicture->setShadow(TRUE, array("X" => 3, "Y" => 3, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10));
     /* Draw a splitted pie chart */
     $PieChart->draw3DPie(120, 90, array("Radius" => 100, "DataGapAngle" => 12, "DataGapRadius" => 10, "Border" => TRUE));
     /* Write the legend box */
     $myPicture->setFontProperties(array("FontName" => pClass . "fonts/Silkscreen.ttf", "FontSize" => 6, "R" => 0, "G" => 0, "B" => 0));
     $PieChart->drawPieLegend(140, 160, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL));
     /* Render the picture (choose the best way) */
     $myPicture->stroke();
     //$myPicture->autoOutput("pictures/example.draw3DPie.transparent.png");
 }
开发者ID:BGCX067,项目名称:facebook-slt-svn-to-git,代码行数:26,代码来源:user_gender.php

示例3: index

 function index()
 {
     $width = 600;
     $height = 230;
     /* Create and populate the pData object */
     $MyData = new pData();
     $MyData->addPoints(array(-4, VOID, VOID, 12, 8, 3), "Female");
     $MyData->addPoints(array(3, 12, 15, 8, 5, -5), "Male");
     //$MyData->addPoints(array(2,0,5,18,19,22),"Probe 3");
     $MyData->setSerieTicks("Male", 4);
     $MyData->setAxisName(0, "Number of males, females");
     $MyData->addPoints(array("Jan", "Feb", "Mar", "Apr", "May", "Jun"), "Labels");
     $MyData->setSerieDescription("Labels", "Months");
     $MyData->setAbscissa("Labels");
     /* Create the pChart object */
     $myPicture = new pImage($width, $height, $MyData);
     /* Draw the background */
     $Settings = array("R" => 170, "G" => 183, "B" => 87, "Dash" => 1, "DashR" => 190, "DashG" => 203, "DashB" => 107);
     $myPicture->drawFilledRectangle(0, 0, $width, $height, $Settings);
     /* Overlay with a gradient */
     $Settings = array("StartR" => 219, "StartG" => 231, "StartB" => 139, "EndR" => 1, "EndG" => 138, "EndB" => 68, "Alpha" => 50);
     $myPicture->drawGradientArea(0, 0, $width, $height, DIRECTION_VERTICAL, $Settings);
     //$myPicture->drawGradientArea(0,0,700,20,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>80));
     /* Add a border to the picture */
     $myPicture->drawRectangle(0, 0, $width - 1, $height - 1, array("R" => 0, "G" => 0, "B" => 0));
     /* Write the picture title */
     //$myPicture->setFontProperties(array("FontName"=>pClass."fonts/Silkscreen.ttf","FontSize"=>6));
     //$myPicture->drawText(10,13,"drawBarChart() - draw a bar chart",array("R"=>255,"G"=>255,"B"=>255));
     /* Write the chart title */
     $myPicture->setFontProperties(array("FontName" => pClass . "fonts/Forgotte.ttf", "FontSize" => 11));
     $myPicture->drawText(250, 55, "Average time to find a set", array("FontSize" => 20, "Align" => TEXT_ALIGN_BOTTOMMIDDLE));
     /* Draw the scale and the 1st chart */
     $myPicture->setGraphArea(60, 60, 450, 190);
     $myPicture->drawFilledRectangle(60, 60, 450, 190, array("R" => 255, "G" => 255, "B" => 255, "Surrounding" => -200, "Alpha" => 10));
     $myPicture->drawScale(array("DrawSubTicks" => TRUE));
     $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10));
     $myPicture->setFontProperties(array("FontName" => pClass . "fonts/pf_arma_five.ttf", "FontSize" => 10));
     $myPicture->drawBarChart(array("DisplayValues" => TRUE, "DisplayColor" => DISPLAY_AUTO, "Rounded" => TRUE, "Surrounding" => 30));
     //$myPicture->drawBarChart(array("DisplayValues"=>TRUE,"DisplayColor"=>DISPLAY_AUTO,"Surrounding"=>30));
     $myPicture->setShadow(FALSE);
     /* Draw the scale and the 2nd chart */
     /*
     $myPicture->setGraphArea(500,60,670,190);
     $myPicture->drawFilledRectangle(500,60,670,190,array("R"=>255,"G"=>255,"B"=>255,"Surrounding"=>-200,"Alpha"=>10));
     $myPicture->drawScale(array("Pos"=>SCALE_POS_TOPBOTTOM,"DrawSubTicks"=>TRUE));
     $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10));
     $myPicture->drawBarChart();
     $myPicture->setShadow(FALSE);
     */
     /* Write the chart legend */
     //$myPicture->drawLegend(510,205,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL));
     $myPicture->drawLegend(500, 105, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_VERTICAL));
     /* Render the picture (choose the best way) */
     $myPicture->stroke();
 }
开发者ID:BGCX067,项目名称:facebook-slt-svn-to-git,代码行数:55,代码来源:avgtime.php

示例4: array

$myPicture->setFontProperties(array("FontName" => "fonts/Forgotte.ttf", "FontSize" => 14));
$TextSettings = array("Align" => TEXT_ALIGN_MIDDLEMIDDLE, "R" => 255, "G" => 255, "B" => 255);
$myPicture->drawText($anchura / 2, 25, $title, $TextSettings);
$myPicture->setFontProperties(array("FontName" => "fonts/Forgotte.ttf", "FontSize" => 10));
$TextSettings = array("Align" => TEXT_ALIGN_MIDDLEMIDDLE, "R" => 0, "G" => 0, "B" => 0);
$myPicture->drawText($anchura / 2, $altura - 20, "Evaluaciones", $TextSettings);
$myPicture->setShadow(FALSE);
$myPicture->setGraphArea(50, 50, $anchura - 25, $altura - 40);
$myPicture->setFontProperties(array("R" => 0, "G" => 0, "B" => 0, "FontName" => "fonts/pf_arma_five.ttf", "FontSize" => 6));
//$Settings = array("Pos"=>SCALE_POS_LEFTRIGHT
//, "Mode"=>SCALE_MODE_FLOATING
//, "LabelingMethod"=>LABELING_ALL
//, "GridR"=>255, "GridG"=>255, "GridB"=>255, "GridAlpha"=>50, "TickR"=>0, "TickG"=>0, "TickB"=>0, "TickAlpha"=>50, "LabelRotation"=>0, "CycleBackground"=>1, "DrawXLines"=>1, "DrawSubTicks"=>1, "SubTickR"=>255, "SubTickG"=>0, "SubTickB"=>0, "SubTickAlpha"=>50, "DrawYLines"=>ALL);
//$myPicture->drawScale($Settings);
$AxisBoundaries = array(0 => array("Min" => 0, "Max" => 10));
$ScaleSettings = array("Mode" => SCALE_MODE_MANUAL, "ManualScale" => $AxisBoundaries, "DrawSubTicks" => TRUE, "DrawArrows" => TRUE, "ArrowSize" => 6);
$myPicture->drawScale($ScaleSettings);
$myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 50, "G" => 50, "B" => 50, "Alpha" => 10));
if ($valores == "on") {
    $Config = array("DisplayValues" => 1);
} else {
    $Config = "";
}
$myPicture->{$dibujo}($Config);
//$Config = array("FontR"=>0, "FontG"=>0, "FontB"=>0, "FontName"=>"fonts/pf_arma_five.ttf", "FontSize"=>6, "Margin"=>6, "Alpha"=>30, "BoxSize"=>5, "Style"=>LEGEND_NOBORDER
//, "Mode"=>LEGEND_HORIZONTAL
//);
$Config = array("FontR" => 0, "FontG" => 0, "FontB" => 0, "FontName" => "fonts/pf_arma_five.ttf", "FontSize" => 6, "Margin" => 6, "Alpha" => 30, "BoxSize" => 5, "Style" => LEGEND_NOBORDER, "Mode" => LEGEND_VERTICAL, "Family" => LEGEND_FAMILY_LINE);
$myPicture->drawLegend($anchura - 200, 6, $Config);
$myPicture->stroke();
开发者ID:AitorMotril,项目名称:eduGraph,代码行数:30,代码来源:graficoAsignaturas.php

示例5: PlotLine

function PlotLine($rowX, $rowY, $name, $ch)
{
    include $_SERVER['DOCUMENT_ROOT'] . "/TBSIM/Lib/class/pData.class.php";
    include $_SERVER['DOCUMENT_ROOT'] . "/TBSIM/Lib/class/pDraw.class.php";
    include $_SERVER['DOCUMENT_ROOT'] . "/TBSIM/Lib/class/pImage.class.php";
    include $_SERVER['DOCUMENT_ROOT'] . "/TBSIM/Lib/class/pPie.class.php";
    //**************************************
    $myData = new pData();
    $myData->addPoints($rowX, "Serie1");
    $myData->setSerieDescription("Serie1", $name);
    //$myData->setSerieOnAxis("Serie1",0);
    $myData->addPoints($rowY, "Absissa");
    $myData->setAbscissa("Absissa");
    //$myData->addPoints(array("January","February","March","April","May","June","July","August"),"Absissa");
    //$myData->setAbscissa("Absissa");
    $myData->setAxisPosition(0, AXIS_POSITION_LEFT);
    //$myData->setAxisName(0,"1st axis");
    $myData->setAxisUnit(0, "");
    $myPicture = new pImage(700, 230, $myData);
    $Settings = array("R" => 240, "G" => 242, "B" => 241, "Dash" => 1, "DashR" => 260, "DashG" => 262, "DashB" => 261);
    $myPicture->drawFilledRectangle(0, 0, 700, 230, $Settings);
    $Settings = array("StartR" => 252, "StartG" => 255, "StartB" => 254, "EndR" => 252, "EndG" => 255, "EndB" => 254, "Alpha" => 50);
    $myPicture->drawGradientArea(0, 0, 700, 230, DIRECTION_VERTICAL, $Settings);
    $myPicture->drawRectangle(0, 0, 699, 229, array("R" => 0, "G" => 0, "B" => 0));
    $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 50, "G" => 50, "B" => 50, "Alpha" => 20));
    $myPicture->setFontProperties(array("FontName" => "fonts/Forgotte.ttf", "FontSize" => 14));
    $TextSettings = array("Align" => TEXT_ALIGN_MIDDLEMIDDLE, "R" => 252, "G" => 252, "B" => 252, "DrawBox" => 1, "BoxAlpha" => 30);
    //$myPicture->drawText(350,25,$name,$TextSettings);
    $myPicture->setShadow(FALSE);
    $myPicture->setGraphArea(50, 50, 675, 190);
    //$myPicture->setFontProperties(array("R"=>0,"G"=>0,"B"=>0,"FontName"=>"fonts/pf_arma_five.ttf","FontSize"=>6));
    $Settings = array("Pos" => SCALE_POS_LEFTRIGHT, "Mode" => SCALE_MODE_FLOATING, "LabelingMethod" => LABELING_ALL, "GridR" => 255, "GridG" => 255, "GridB" => 255, "GridAlpha" => 50, "TickR" => 0, "TickG" => 0, "TickB" => 0, "TickAlpha" => 50, "LabelRotation" => 0, "CycleBackground" => 1, "DrawXLines" => 1, "DrawSubTicks" => 1, "SubTickR" => 255, "SubTickG" => 0, "SubTickB" => 0, "SubTickAlpha" => 50, "DrawYLines" => ALL);
    $myPicture->drawScale($Settings);
    $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 50, "G" => 50, "B" => 50, "Alpha" => 10));
    $Config = "";
    if ($ch == 1) {
        $myPicture->drawSplineChart($Config);
    }
    if ($ch == 2) {
        $myPicture->drawBarChart($Config);
    }
    if ($ch == 3) {
        $myPicture->drawLineChart($Config);
    }
    if ($ch == 4) {
        $myPicture->drawPlotChart($Config);
    }
    if ($ch == 5) {
        $myPicture->drawStepChart($Config);
    }
    if ($ch == 6) {
        $myPicture->drawAreaChart($Config);
    }
    if ($ch == 7) {
        $myPicture->drawFilledSplineChart($Config);
    }
    if ($ch == 8) {
        $myPicture->drawFilledStepChart($Config);
    }
    if ($ch == 9) {
        $myPicture->drawStackedAreaChart($Config);
    }
    $Config = array("FontR" => 0, "FontG" => 0, "FontB" => 0, "FontName" => "fonts/pf_arma_five.ttf", "FontSize" => 6, "Margin" => 6, "Alpha" => 30, "BoxSize" => 5, "Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL);
    $myPicture->drawLegend(563, 16, $Config);
    $myPicture->stroke();
}
开发者ID:tarekdjouad,项目名称:TBIMS,代码行数:66,代码来源:Plot.php

示例6: pImage

    $myData->setSerieOnAxis("Serie2", 0);
    $myData->addPoints($rounds, "Absissa");
    $myData->setAbscissa("Absissa");
    $myData->setAxisPosition(0, AXIS_POSITION_LEFT);
    $myData->setAxisName(0, "Players");
    $myData->setAxisUnit(0, "");
    $myPicture = new pImage(600, 300, $myData, TRUE);
    $myPicture->setFontProperties(array("FontName" => "../pchart/fonts/Forgotte.ttf", "FontSize" => 12));
    $TextSettings = array("Align" => TEXT_ALIGN_MIDDLEMIDDLE, "R" => 150, "G" => 150, "B" => 150);
    // if so, this is a server stats page
    if (!empty($sid)) {
        $myPicture->drawText(297, 18, "Joins and leaves of this server in last " . $limit . " rounds.", $TextSettings);
    } else {
        $myPicture->drawText(297, 18, "Joins and leaves of these servers in last " . $limit . " rounds.", $TextSettings);
    }
    $myPicture->setShadow(FALSE);
    $myPicture->setGraphArea(50, 50, 576, 270);
    $myPicture->setFontProperties(array("R" => 150, "G" => 150, "B" => 150, "FontName" => "../pchart/fonts/pf_arma_five.ttf", "FontSize" => 6));
    $Settings = array("Pos" => SCALE_POS_LEFTRIGHT, "Mode" => SCALE_MODE_FLOATING, "LabelingMethod" => LABELING_ALL, "GridR" => 150, "GridG" => 150, "GridB" => 150, "GridAlpha" => 50, "TickR" => 150, "TickG" => 150, "TickB" => 150, "TickAlpha" => 50, "LabelRotation" => 0, "CycleBackground" => 1, "DrawXLines" => 0, "DrawSubTicks" => 1, "SubTickR" => 150, "SubTickG" => 150, "SubTickB" => 150, "SubTickAlpha" => 50, "DrawYLines" => NONE, "AxisR" => 150, "AxisG" => 150, "AxisB" => 150);
    $myPicture->drawScale($Settings);
    $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 50, "G" => 50, "B" => 50, "Alpha" => 10));
    $Config = "";
    $myPicture->drawSplineChart($Config);
    $Config = array("FontR" => 150, "FontG" => 150, "FontB" => 150, "FontName" => "../pchart/fonts/pf_arma_five.ttf", "FontSize" => 6, "Margin" => 6, "Alpha" => 30, "BoxSize" => 5, "Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL);
    $myPicture->drawLegend(529, 12, $Config);
    $myPicture->stroke($BrowserExpire = TRUE);
} else {
    // start outputting the image
    header("Content-type: image/png");
    echo file_get_contents('./images/error.png');
}
开发者ID:pwk,项目名称:BF4-Server-Stats,代码行数:31,代码来源:joins-leaves.php

示例7: pImage

            $data->setAxisName(0, "Gigabytes");
        }
    }
}
// Read data from the database, and add it
$data->addPoints($times, "Labels");
$data->setSerieDescription("Labels", "Time of day");
$data->setAbscissa("Labels");
$chart = new pImage(700, 230, $data);
/* Turn of Antialiasing */
$chart->Antialias = FALSE;
/* Add a border to the picture */
$chart->drawRectangle(0, 0, 699, 229, array("R" => 0, "G" => 0, "B" => 0));
/* Write the chart title */
$chart->setFontProperties(array("FontName" => FONT_PATH . "/Forgotte.ttf", "FontSize" => 11));
$chart->drawText(150, 35, $title, array("FontSize" => 20, "Align" => TEXT_ALIGN_BOTTOMMIDDLE));
/* Set the default font */
$chart->setFontProperties(array("FontName" => FONT_PATH . "/pf_arma_five.ttf", "FontSize" => 6));
/* Define the chart area */
$chart->setGraphArea(60, 40, 650, 200);
/* Draw the scale */
$chart->drawScale($scaleSettings);
/* Write the chart legend */
$chart->drawLegend(540, 20, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL));
/* Turn on Antialiasing */
$chart->Antialias = TRUE;
/* Draw the area chart */
$chart->drawAreaChart();
/* Render the picture (choose the best way) */
$chart->stroke();
开发者ID:TuffLuck,项目名称:status2,代码行数:30,代码来源:graph.php

示例8: pch_threshold_graph

function pch_threshold_graph($graph_type, $index, $data, $width, $height, $font, $antialiasing, $xaxisname = "", $yaxisname = "", $title = "", $show_values = false, $show_legend = false, $font_size)
{
    /* CAT:Threshold Chart */
    /* Create and populate the pData object */
    $MyData = new pData();
    $MyData->addPoints($data, "DEFCA");
    $MyData->setAxisName(0, $yaxisname);
    $MyData->setAxisDisplay(0, AXIS_FORMAT_CURRENCY);
    $MyData->addPoints($index, "Labels");
    $MyData->setSerieDescription("Labels", $xaxisname);
    $MyData->setAbscissa("Labels");
    $MyData->setPalette("DEFCA", array("R" => 55, "G" => 91, "B" => 127));
    /* Create the pChart object */
    $myPicture = new pImage(700, 230, $MyData);
    $myPicture->drawGradientArea(0, 0, 700, 230, DIRECTION_VERTICAL, array("StartR" => 220, "StartG" => 220, "StartB" => 220, "EndR" => 255, "EndG" => 255, "EndB" => 255, "Alpha" => 100));
    $myPicture->drawRectangle(0, 0, 699, 229, array("R" => 200, "G" => 200, "B" => 200));
    /* Write the picture title */
    $myPicture->setFontProperties(array("FontName" => $font, "FontSize" => $font_size));
    $myPicture->drawText(60, 35, $title, array("FontSize" => $font_size, "Align" => TEXT_ALIGN_BOTTOMLEFT));
    /* Do some cosmetic and draw the chart */
    $myPicture->setGraphArea(60, 40, 670, 190);
    $myPicture->drawFilledRectangle(60, 40, 670, 190, array("R" => 255, "G" => 255, "B" => 255, "Surrounding" => -200, "Alpha" => 10));
    $myPicture->drawScale(array("GridR" => 180, "GridG" => 180, "GridB" => 180, "Mode" => SCALE_MODE_START0));
    $myPicture->setShadow(TRUE, array("X" => 2, "Y" => 2, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10));
    $myPicture->setFontProperties(array("FontName" => $font, "FontSize" => $font_size));
    $settings = array("Gradient" => TRUE, "GradientMode" => GRADIENT_EFFECT_CAN, "DisplayValues" => $show_values, "DisplayZeroValues" => FALSE, "DisplayR" => 100, "DisplayG" => 100, "DisplayB" => 100, "DisplayShadow" => TRUE, "Surrounding" => 5, "AroundZero" => FALSE);
    $myPicture->drawSplineChart($settings);
    $myPicture->setShadow(FALSE);
    if ($show_legend) {
        /* Write the chart legend */
        $myPicture->drawLegend(643, 210, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL));
    }
    /* Render the picture */
    $myPicture->stroke();
}
开发者ID:articaST,项目名称:integriaims,代码行数:35,代码来源:functions_pchart.php

示例9: sendToBrowser

 /**
  * Output rendering to browser
  */
 public function sendToBrowser()
 {
     $this->pImage->stroke();
 }
开发者ID:nomoto-ubicast,项目名称:piwik,代码行数:7,代码来源:StaticGraph.php

示例10: frequency

 /**
  * Frequency
  *
  * This uses the pChart library to graph the frequency.
  *
  * Upon browser request, this script will run with the specificed
  * percentage ($value) as a parameter. The pChart script will generate
  * a graph image on-the-fly which will then be displayed on the
  * variant page. As stated, they are on-the-fly images that are returned
  * at runtime and are not actually saved anywhere.
  *
  * The pChart library that can be found in application/third_party/pChart/
  * More info on pChart at http://www.pchart.net/
  *
  * @author Nikhil Anand
  * @author Sean Ephraim
  * @access public
  * @return void
  */
 public function frequency()
 {
     // this is needed to allow stroke() to modify headers
     ob_end_clean();
     // pChart Classes
     require_once APPPATH . "third_party/pChart/class/pDraw.class.php";
     require_once APPPATH . "third_party/pChart/class/pImage.class.php";
     // Validate precent value
     if (isset($_GET["value"]) && is_numeric($_GET["value"])) {
         $percent = trim($_GET["value"]);
     } else {
         print "Invalid value.\n";
         exit;
     }
     // Set default size
     $size = 200;
     if (isset($_GET["small"])) {
         $size = 60;
     }
     // Small bug with 0%
     if ($percent == 0) {
         $percent = 0.001;
     }
     /* Initialize object */
     $myPicture = new pImage($size, 12);
     $myPicture->setFontProperties(array("FontName" => APPPATH . "third_party/pChart/fonts/GeosansLight.ttf", "FontSize" => 15));
     /* Set options */
     $progressOptions = array("Width" => $size - 1, "Height" => 11, "R" => 8, "G" => 160, "B" => 43, "Surrounding" => 0, "BoxBorderR" => 204, "BoxBorderG" => 204, "BoxBorderB" => 204, "BoxBackR" => 255, "BoxBackG" => 255, "BoxBackB" => 255, "RFade" => 206, "GFade" => 133, "BFade" => 30, "ShowLabel" => FALSE);
     /* Draw a progress bar */
     $myPicture->drawProgress(0, 0, $percent, $progressOptions);
     $myPicture->stroke();
 }
开发者ID:mandress64,项目名称:cordova,代码行数:51,代码来源:variations.php

示例11: drawchart

 public static function drawchart($data)
 {
     // Include the chart libraries.
     $plib = '../iomad/pchart';
     require_once "{$plib}/class/pDraw.class.php";
     require_once "{$plib}/class/pPie.class.php";
     require_once "{$plib}/class/pImage.class.php";
     require_once "{$plib}/class/pData.class.php";
     // Chart data.
     $chartdata = new pData();
     $chartdata->addPoints(array($data->notstarted, $data->inprogress, $data->completed), "Value");
     // Labels.
     $chartdata->addPoints(array('Not started', 'In progress', 'Completed'), "Legend");
     $chartdata->setAbscissa("Legend");
     // Chart object.
     $chart = new pImage(350, 180, $chartdata);
     // Pie chart object.
     $pie = new pPie($chart, $chartdata);
     $chart->setShadow(false);
     $chart->setFontProperties(array("FontName" => "{$plib}/fonts/GeosansLight.ttf", "FontSize" => 11));
     $pie->setSliceColor(0, array("R" => 200, "G" => 0, "B" => 0));
     $pie->setSliceColor(1, array("R" => 200, "G" => 200, "B" => 0));
     $pie->setSliceColor(2, array("R" => 0, "G" => 200, "B" => 0));
     $pie->draw3Dpie(175, 100, array("Radius" => 80, "DrawLabels" => true, "DataGapAngle" => 10, "DataGapRadius" => 6, "Border" => true));
     // Display the chart.
     $chart->stroke();
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:27,代码来源:lib.php


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