本文整理汇总了PHP中pImage::drawXThreshold方法的典型用法代码示例。如果您正苦于以下问题:PHP pImage::drawXThreshold方法的具体用法?PHP pImage::drawXThreshold怎么用?PHP pImage::drawXThreshold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pImage
的用法示例。
在下文中一共展示了pImage::drawXThreshold方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$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, 699, 229, array("R" => 0, "G" => 0, "B" => 0));
/* Write the picture title */
$myPicture->setFontProperties(array("FontName" => "../fonts/Silkscreen.ttf", "FontSize" => 6));
$myPicture->drawText(10, 13, "drawThreshold() - draw a treshold in the charting area", array("R" => 255, "G" => 255, "B" => 255));
/* Write the chart title */
$myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 11));
$myPicture->drawText(250, 55, "My chart title", array("FontSize" => 20, "Align" => TEXT_ALIGN_BOTTOMMIDDLE));
/* Draw the scale and do some cosmetics */
$myPicture->setGraphArea(60, 60, 450, 190);
$myPicture->drawFilledRectangle(70, 70, 440, 180, array("R" => 255, "G" => 255, "B" => 255, "Surrounding" => -200, "Alpha" => 10));
$myPicture->drawScale(array("XMargin" => 10, "YMargin" => 10, "Floating" => TRUE, "DrawSubTicks" => TRUE));
$myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 20));
/* Draw static thresholds */
$myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 10));
$myPicture->drawXThreshold("Feb", array("ValueIsLabel" => TRUE, "WriteCaption" => TRUE, "Caption" => "Step 1", "Alpha" => 70, "Ticks" => 1));
$myPicture->drawXThreshold(2, array("WriteCaption" => TRUE, "Caption" => "Step 2", "Alpha" => 70, "Ticks" => 2, "R" => 0, "G" => 0, "B" => 255));
/* Disable shadow computing */
$myPicture->setShadow(FALSE);
/* Draw the scale and do some cosmetics */
$myPicture->setGraphArea(500, 60, 670, 190);
$myPicture->drawFilledRectangle(505, 65, 665, 185, array("R" => 255, "G" => 255, "B" => 255, "Surrounding" => -200, "Alpha" => 10));
$myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 11));
$myPicture->drawScale(array("XMargin" => 5, "YMargin" => 5, "Floating" => TRUE, "Pos" => SCALE_POS_TOPBOTTOM, "DrawSubTicks" => TRUE));
$myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 20));
/* Draw static thresholds */
$myPicture->drawXThreshold(array(1, 3), array("Alpha" => 70, "Ticks" => 1));
$myPicture->drawXThreshold(2, array("Alpha" => 70, "Ticks" => 2, "R" => 0, "G" => 0, "B" => 255));
/* Render the picture (choose the best way) */
$myPicture->autoOutput("pictures/example.drawXThreshold.png");
示例2: array
$myPicture->drawGradientArea(540, 0, 700, 30, 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, 699, 229, array("R" => 0, "G" => 0, "B" => 0));
$myPicture->drawRectangle(540, 0, 699, 31, array("R" => 0, "G" => 0, "B" => 0));
/* Write the chart title */
$myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 20));
$myPicture->drawText(110, 35, "Functions computing", array("Align" => TEXT_ALIGN_BOTTOMMIDDLE));
/* Set the default font */
$myPicture->setFontProperties(array("FontName" => "../fonts/pf_arma_five.ttf", "FontSize" => 6));
/* Define the chart area */
$myPicture->setGraphArea(60, 40, 650, 200);
/* Draw the scale */
$scaleSettings = array("XMargin" => 10, "YMargin" => 10, "Floating" => TRUE, "GridR" => 200, "GridG" => 200, "GridB" => 200, "DrawSubTicks" => TRUE, "CycleBackground" => TRUE);
$myPicture->drawScale($scaleSettings);
/* Turn on Antialiasing */
$myPicture->Antialias = TRUE;
/* Turn on shadows */
$myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10));
/* Draw the 0 threshold */
$myPicture->drawThreshold(0, array("Alpha" => 70, "Ticks" => 1));
$myPicture->drawXThreshold(10, array("Alpha" => 70, "Ticks" => 1));
/* Draw a zone chart */
$myPicture->drawZoneChart("Serie 2", "Serie 3", array("AreaR" => 200, "AreaAlpha" => 30));
/* Draw the line chart */
$myPicture->drawLineChart();
$myPicture->drawPlotChart(array("PlotBorder" => TRUE, "BorderSize" => 1, "Surrounding" => -60, "BorderAlpha" => 80));
/* Write the chart legend */
$myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 11, "R" => 255, "G" => 255, "B" => 255));
$myPicture->drawLegend(560, 15, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL));
/* Render the picture (choose the best way) */
$myPicture->autoOutput("pictures/example.createFunctionSerie.png");