$myPicture = new pImage(700, 230, $MyData); /* Turn of Antialiasing */ $myPicture->Antialias = FALSE; /* Add a border to the picture */ $myPicture->drawGradientArea(0, 0, 700, 230, DIRECTION_VERTICAL, array("StartR" => 240, "StartG" => 240, "StartB" => 240, "EndR" => 80, "EndG" => 80, "EndB" => 80, "Alpha" => 100)); $myPicture->drawGradientArea(0, 0, 700, 230, DIRECTION_HORIZONTAL, array("StartR" => 240, "StartG" => 240, "StartB" => 240, "EndR" => 80, "EndG" => 80, "EndB" => 80, "Alpha" => 20)); $myPicture->drawRectangle(0, 0, 699, 229, array("R" => 0, "G" => 0, "B" => 0)); /* 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("GridR" => 200, "GridG" => 200, "GridB" => 200, "DrawSubTicks" => TRUE, "CycleBackground" => TRUE); $myPicture->drawScale($scaleSettings); /* Write the chart legend */ $myPicture->drawLegend(580, 12, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL)); /* Turn on shadow computing */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); /* Draw the chart */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); $settings = array("Surrounding" => -30, "InnerSurrounding" => 30, "Interleave" => 0); $myPicture->drawBarChart($settings); /* Draw the bottom black area */ $myPicture->setShadow(FALSE); $myPicture->drawFilledRectangle(0, 174, 700, 230, array("R" => 0, "G" => 0, "B" => 0)); /* Do the mirror effect */ $myPicture->drawAreaMirror(0, 174, 700, 48); /* Draw the horizon line */ $myPicture->drawLine(1, 174, 698, 174, array("R" => 80, "G" => 80, "B" => 80)); /* Render the picture (choose the best way) */ $myPicture->autoOutput("pictures/example.drawAreaMirror.png");
/* pChart library inclusions */ include "../class/pData.class.php"; include "../class/pDraw.class.php"; include "../class/pImage.class.php"; /* Create and populate the pData object */ $MyData = new pData(); $MyData->setAxisName(0, "Strength"); for ($i = 0; $i <= 720; $i = $i + 20) { $MyData->addPoints(cos(deg2rad($i)) * 100, "Probe 1"); $MyData->addPoints(cos(deg2rad($i + 90)) * 60, "Probe 2"); } /* Create the pChart object */ $myPicture = new pImage(847, 304, $MyData); $myPicture->drawGradientArea(0, 0, 847, 304, DIRECTION_VERTICAL, array("StartR" => 47, "StartG" => 47, "StartB" => 47, "EndR" => 17, "EndG" => 17, "EndB" => 17, "Alpha" => 100)); $myPicture->drawGradientArea(0, 250, 847, 304, DIRECTION_VERTICAL, array("StartR" => 47, "StartG" => 47, "StartB" => 47, "EndR" => 27, "EndG" => 27, "EndB" => 27, "Alpha" => 100)); $myPicture->drawLine(0, 249, 847, 249, array("R" => 0, "G" => 0, "B" => 0)); $myPicture->drawLine(0, 250, 847, 250, array("R" => 70, "G" => 70, "B" => 70)); /* Add a border to the picture */ $myPicture->drawRectangle(0, 0, 846, 303, array("R" => 204, "G" => 204, "B" => 204)); /* Write the picture title */ $myPicture->setFontProperties(array("FontName" => "../fonts/pf_arma_five.ttf", "FontSize" => 6)); $myPicture->drawText(423, 14, "Cyclic magnetic field strength", array("R" => 255, "G" => 255, "B" => 255, "Align" => TEXT_ALIGN_MIDDLEMIDDLE)); /* Define the chart area */ $myPicture->setGraphArea(58, 27, 816, 228); /* Draw a rectangle */ $myPicture->drawFilledRectangle(58, 27, 816, 228, array("R" => 0, "G" => 0, "B" => 0, "Dash" => TRUE, "DashR" => 0, "DashG" => 51, "DashB" => 51, "BorderR" => 0, "BorderG" => 0, "BorderB" => 0)); /* Turn on shadow computing */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 20)); /* Draw the scale */ $myPicture->setFontProperties(array("R" => 255, "G" => 255, "B" => 255)); $ScaleSettings = array("XMargin" => 4, "DrawSubTicks" => TRUE, "GridR" => 255, "GridG" => 255, "GridB" => 255, "AxisR" => 255, "AxisG" => 255, "AxisB" => 255, "GridAlpha" => 30, "CycleBackground" => TRUE);
/* CAT:Drawing */ /* pChart library inclusions */ include "../class/pDraw.class.php"; include "../class/pImage.class.php"; /* Create the pChart object */ $myPicture = new pImage(700, 230); /* Draw the background */ $Settings = array("R" => 170, "G" => 183, "B" => 87, "Dash" => 1, "DashR" => 190, "DashG" => 203, "DashB" => 107); $myPicture->drawFilledRectangle(0, 0, 700, 230, $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, 700, 230, 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)); /* Draw the picture border */ $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, "drawLine() - Basis", array("R" => 255, "G" => 255, "B" => 255)); /* Turn on shadow computing */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 20)); /* Draw some lines */ for ($i = 1; $i <= 100; $i = $i + 4) { $myPicture->drawLine($i + 5, 215, $i * 7 + 5, 30, array("R" => rand(0, 255), "G" => rand(0, 255), "B" => rand(0, 255), "Ticks" => rand(0, 4))); } /* Draw an horizontal dashed line with extra weight */ $myPicture->drawLine(370, 160, 650, 160, array("R" => 0, "G" => 0, "B" => 0, "Ticks" => 4, "Weight" => 3)); /* Another example of extra weight */ $myPicture->drawLine(370, 180, 650, 200, array("R" => 255, "G" => 255, "B" => 255, "Ticks" => 15, "Weight" => 1)); /* Render the picture (choose the best way) */ $myPicture->autoOutput("pictures/example.drawLine.png");
include "../class/pImage.class.php"; /* Create and populate the pData object */ $MyData = new pData(); $MyData->addPoints(array(2, 7, 5, 18, VOID, 12, 10, 15, 8, 5, 6, 9), "Help Desk"); $MyData->setAxisName(0, "Incidents"); $MyData->addPoints(array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jui", "Aou", "Sep", "Oct", "Nov", "Dec"), "Labels"); $MyData->setSerieDescription("Labels", "Months"); $MyData->setAbscissa("Labels"); /* Create the pChart object */ $myPicture = new pImage(700, 230, $MyData); $myPicture->drawGradientArea(0, 0, 700, 230, DIRECTION_VERTICAL, array("StartR" => 100, "StartG" => 100, "StartB" => 100, "EndR" => 50, "EndG" => 50, "EndB" => 50, "Alpha" => 100)); $myPicture->drawGradientArea(0, 0, 700, 230, DIRECTION_HORIZONTAL, array("StartR" => 100, "StartG" => 100, "StartB" => 100, "EndR" => 50, "EndG" => 50, "EndB" => 50, "Alpha" => 20)); $myPicture->drawGradientArea(0, 0, 60, 230, DIRECTION_HORIZONTAL, array("StartR" => 0, "StartG" => 0, "StartB" => 0, "EndR" => 50, "EndG" => 50, "EndB" => 50, "Alpha" => 100)); /* Do some cosmetics */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); $myPicture->drawLine(60, 0, 60, 230, array("R" => 70, "G" => 70, "B" => 70)); $myPicture->drawRectangle(0, 0, 699, 229, array("R" => 0, "G" => 0, "B" => 0)); $myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 11)); $myPicture->drawText(35, 115, "Recorded cases", array("R" => 255, "G" => 255, "B" => 255, "FontSize" => 20, "Angle" => 90, "Align" => TEXT_ALIGN_BOTTOMMIDDLE)); /* Draw a spline chart */ $myPicture->setGraphArea(100, 30, 680, 190); $myPicture->drawFilledRectangle(100, 30, 680, 190, array("R" => 255, "G" => 255, "B" => 255, "Alpha" => 20)); $myPicture->setFontProperties(array("R" => 255, "G" => 255, "B" => 255, "FontName" => "../fonts/pf_arma_five.ttf", "FontSize" => 6)); $myPicture->drawScale(array("AxisR" => 255, "AxisG" => 255, "AxisB" => 255, "DrawSubTicks" => TRUE, "CycleBackground" => TRUE)); $myPicture->drawSplineChart(); /* Write the data bounds */ $myPicture->writeBounds(); $myPicture->setShadow(FALSE); /* Write the chart legend */ $myPicture->drawLegend(630, 215, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL)); /* Render the picture (choose the best way) */
include "../class/pDraw.class.php"; include "../class/pRadar.class.php"; include "../class/pImage.class.php"; /* Create and populate the pData object */ $MyData = new pData(); $MyData->addPoints(array(4, 4, 10, 10, 4, 4, 15, 15, 4, 4, 10, 10, 4, 4, 15, 15, 4, 4, 10, 10, 4, 4, 15, 15), "ScoreA"); $MyData->setSerieDescription("ScoreA", "Application A"); $MyData->setPalette("ScoreA", array("R" => 150, "G" => 5, "B" => 217)); /* Define the absissa serie */ $MyData->addPoints(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24), "Time"); $MyData->setAbscissa("Time"); /* Create the pChart object */ $myPicture = new pImage(300, 300, $MyData); $myPicture->drawGradientArea(0, 0, 300, 300, DIRECTION_VERTICAL, array("StartR" => 200, "StartG" => 200, "StartB" => 200, "EndR" => 240, "EndG" => 240, "EndB" => 240, "Alpha" => 100)); $myPicture->drawGradientArea(0, 0, 300, 20, DIRECTION_HORIZONTAL, array("StartR" => 30, "StartG" => 30, "StartB" => 30, "EndR" => 100, "EndG" => 100, "EndB" => 100, "Alpha" => 100)); $myPicture->drawLine(0, 20, 300, 20, array("R" => 255, "G" => 255, "B" => 255)); $RectangleSettings = array("R" => 180, "G" => 180, "B" => 180, "Alpha" => 100); /* Add a border to the picture */ $myPicture->drawRectangle(0, 0, 299, 299, array("R" => 0, "G" => 0, "B" => 0)); /* Write the picture title */ $myPicture->setFontProperties(array("FontName" => "../fonts/Silkscreen.ttf", "FontSize" => 6)); $myPicture->drawText(10, 13, "pRadar - Draw radar charts", array("R" => 255, "G" => 255, "B" => 255)); /* Set the default font properties */ $myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 10, "R" => 80, "G" => 80, "B" => 80)); /* Enable shadow computing */ $myPicture->setShadow(TRUE, array("X" => 2, "Y" => 2, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); /* Create the pRadar object */ $SplitChart = new pRadar(); /* Draw a radar chart */ $myPicture->setGraphArea(10, 25, 290, 290); $Options = array("SkipLabels" => 3, "LabelMiddle" => TRUE, "Layout" => RADAR_LAYOUT_STAR, "BackgroundGradient" => array("StartR" => 255, "StartG" => 255, "StartB" => 255, "StartAlpha" => 100, "EndR" => 207, "EndG" => 227, "EndB" => 125, "EndAlpha" => 50));
public static function tests_pchart3() { /* @ 700x230 Filled spline chart drawing example. */ /* pChart library inclusions */ include 'lib/pChart/class/pData.class'; include 'lib/pChart/class/pDraw.class'; include 'lib/pChart/class/pImage.class'; /* Create and populate the pData object */ $MyData = new pData(); $MyData->setAxisName(0, "Strength"); for ($i = 0; $i <= 720; $i = $i + 20) { $MyData->addPoints(cos(deg2rad($i)) * 100, "Probe 1"); $MyData->addPoints(cos(deg2rad($i + 90)) * 60, "Probe 2"); } /* Create the pChart object */ $myPicture = new pImage(847, 304, $MyData); $myPicture->drawGradientArea(0, 0, 847, 304, DIRECTION_VERTICAL, array("StartR" => 47, "StartG" => 47, "StartB" => 47, "EndR" => 17, "EndG" => 17, "EndB" => 17, "Alpha" => 100)); $myPicture->drawGradientArea(0, 250, 847, 304, DIRECTION_VERTICAL, array("StartR" => 47, "StartG" => 47, "StartB" => 47, "EndR" => 27, "EndG" => 27, "EndB" => 27, "Alpha" => 100)); $myPicture->drawLine(0, 249, 847, 249, array("R" => 0, "G" => 0, "B" => 0)); $myPicture->drawLine(0, 250, 847, 250, array("R" => 70, "G" => 70, "B" => 70)); /* Add a border to the picture */ $myPicture->drawRectangle(0, 0, 846, 303, array("R" => 204, "G" => 204, "B" => 204)); /* Write the picture title */ $myPicture->setFontProperties(array("FontName" => CINTIENT_INSTALL_DIR . "lib/pChart/fonts/pf_arma_five.ttf", "FontSize" => 6)); $myPicture->drawText(423, 14, "Cyclic magnetic field strength", array("R" => 255, "G" => 255, "B" => 255, "Align" => TEXT_ALIGN_MIDDLEMIDDLE)); /* Define the chart area */ $myPicture->setGraphArea(58, 27, 816, 228); /* Draw a rectangle */ $myPicture->drawFilledRectangle(58, 27, 816, 228, array("R" => 0, "G" => 0, "B" => 0, "Dash" => TRUE, "DashR" => 0, "DashG" => 51, "DashB" => 51, "BorderR" => 0, "BorderG" => 0, "BorderB" => 0)); /* Turn on shadow computing */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 20)); /* Draw the scale */ $myPicture->setFontProperties(array("R" => 255, "G" => 255, "B" => 255)); $ScaleSettings = array("XMargin" => 4, "DrawSubTicks" => TRUE, "GridR" => 255, "GridG" => 255, "GridB" => 255, "AxisR" => 255, "AxisG" => 255, "AxisB" => 255, "GridAlpha" => 30, "CycleBackground" => TRUE); $myPicture->drawScale($ScaleSettings); /* Draw the spline chart */ $myPicture->drawFilledSplineChart(); /* Write the chart boundaries */ $BoundsSettings = array("MaxDisplayR" => 237, "MaxDisplayG" => 23, "MaxDisplayB" => 48, "MinDisplayR" => 23, "MinDisplayG" => 144, "MinDisplayB" => 237); $myPicture->writeBounds(BOUND_BOTH, $BoundsSettings); /* Write the 0 line */ $myPicture->drawThreshold(0, array("WriteCaption" => TRUE)); /* Write the chart legend */ $myPicture->setFontProperties(array("R" => 255, "G" => 255, "B" => 255)); $myPicture->drawLegend(560, 266, array("Style" => LEGEND_NOBORDER)); /* Write the 1st data series statistics */ $Settings = array("R" => 188, "G" => 224, "B" => 46, "Align" => TEXT_ALIGN_BOTTOMLEFT); $myPicture->drawText(620, 270, "Max : " . ceil($MyData->getMax("Probe 1")), $Settings); $myPicture->drawText(680, 270, "Min : " . ceil($MyData->getMin("Probe 1")), $Settings); $myPicture->drawText(740, 270, "Avg : " . ceil($MyData->getSerieAverage("Probe 1")), $Settings); /* Write the 2nd data series statistics */ $Settings = array("R" => 224, "G" => 100, "B" => 46, "Align" => TEXT_ALIGN_BOTTOMLEFT); $myPicture->drawText(620, 283, "Max : " . ceil($MyData->getMax("Probe 2")), $Settings); $myPicture->drawText(680, 283, "Min : " . ceil($MyData->getMin("Probe 2")), $Settings); $myPicture->drawText(740, 283, "Avg : " . ceil($MyData->getSerieAverage("Probe 2")), $Settings); /* Render the picture (choose the best way) */ $myPicture->autoOutput("pictures/example.drawFilledSplineChart.png"); }
/* Overlay with a gradient */ $Settings = array("StartR" => 219, "StartG" => 231, "StartB" => 139, "EndR" => 1, "EndG" => 138, "EndB" => 68, "Alpha" => 50); $myPicture->drawGradientArea(0, 0, 700, 230, 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, 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, "drawPieLegend - Draw pie charts legend", array("R" => 255, "G" => 255, "B" => 255)); /* Set the default font properties */ $myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 10, "R" => 80, "G" => 80, "B" => 80)); /* Enable shadow computing */ $myPicture->setShadow(TRUE, array("X" => 2, "Y" => 2, "R" => 150, "G" => 150, "B" => 150, "Alpha" => 100)); /* Create the pPie object */ $PieChart = new pPie($myPicture, $MyData); /* Draw two AA pie chart */ $PieChart->draw2DPie(200, 100, array("Border" => TRUE)); $PieChart->draw2DPie(440, 115, array("Border" => TRUE)); /* Write down the legend next to the 2nd chart*/ $PieChart->drawPieLegend(550, 70); /* Write a legend box under the 1st chart */ $myPicture->setFontProperties(array("FontName" => "../fonts/pf_arma_five.ttf", "FontSize" => 6)); $PieChart->drawPieLegend(90, 176, array("Style" => LEGEND_BOX, "Mode" => LEGEND_HORIZONTAL)); /* Write the bottom legend box */ $myPicture->setFontProperties(array("FontName" => "../fonts/Silkscreen.ttf", "FontSize" => 6)); $myPicture->drawGradientArea(1, 200, 698, 228, DIRECTION_VERTICAL, array("StartR" => 247, "StartG" => 247, "StartB" => 247, "EndR" => 217, "EndG" => 217, "EndB" => 217, "Alpha" => 20)); $myPicture->drawLine(1, 199, 698, 199, array("R" => 100, "G" => 100, "B" => 100, "Alpha" => 20)); $myPicture->drawLine(1, 200, 698, 200, array("R" => 255, "G" => 255, "B" => 255, "Alpha" => 20)); $PieChart->drawPieLegend(10, 210, array("Style" => LEGEND_NOBORDER, "Mode" => LEGEND_HORIZONTAL)); /* Render the picture (choose the best way) */ $myPicture->autoOutput("pictures/example.drawPieLegend.png");
function pch_slicebar_graph($graph_type, $data, $period, $width, $height, $colors, $font, $round_corner, $font_size, $antialiasing = true) { /* CAT:Slicebar charts */ set_time_limit(0); // Dataset definition $myPicture = new pImage($width, $height); /* Turn of Antialiasing */ $myPicture->Antialias = $antialiasing; $myPicture->setFontProperties(array("FontName" => $font, "FontSize" => $font_size, "R" => 80, "G" => 80, "B" => 80)); // Round corners defined in global setup if ($round_corner != 0) { $radius = $height > 18 ? 8 : 0; } else { $radius = 0; } $thinest_slice = $width / $period; /* Color stuff */ $colorsrgb = array(); foreach ($colors as $key => $col) { $rgb = html2rgb($col); $colorsrgb[$key]['R'] = $rgb[0]; $colorsrgb[$key]['G'] = $rgb[1]; $colorsrgb[$key]['B'] = $rgb[2]; } $i = 0; foreach ($data as $d) { $color = $d['data']; $color = $colorsrgb[$color]; $ratio = $thinest_slice * $d['utimestamp']; $myPicture->drawRoundedFilledRectangle($i, 0, $ratio + $i, $height, $radius, array('R' => $color['R'], 'G' => $color['G'], 'B' => $color['B'])); $i += $ratio; } if ($round_corner) { /* Under this value, the rounded rectangle is painted great */ if ($thinest_slice <= 16) { /* Clean a bit of pixels */ for ($i = 0; $i < 7; $i++) { $myPicture->drawLine(0, $i, 6 - $i, $i, array('R' => 255, 'G' => 255, 'B' => 255)); } $end = $height - 1; for ($i = 0; $i < 7; $i++) { $myPicture->drawLine(0, $end - $i, 5 - $i, $end - $i, array('R' => 255, 'G' => 255, 'B' => 255)); } } } $myPicture->drawRoundedRectangle(0, 0, $width, $height - 1, $radius, array('R' => 157, 'G' => 157, 'B' => 157)); $myPicture->Stroke(); }
/* pChart library inclusions */ include "../class/pDraw.class.php"; include "../class/pBarcode39.class.php"; include "../class/pBarcode128.class.php"; include "../class/pImage.class.php"; /* Create the pChart object */ $myPicture = new pImage(600, 310); $myPicture->drawFilledRectangle(0, 0, 600, 310, array("R" => 240, "G" => 240, "B" => 240)); /* Draw the rounded box */ $myPicture->setShadow(TRUE, array("X" => 2, "Y" => 2, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 30)); $Settings = array("R" => 255, "G" => 255, "B" => 255, "BorderR" => 0, "BorderG" => 0, "BorderB" => 0); $myPicture->drawRoundedFilledRectangle(10, 10, 590, 300, 10, $Settings); /* Draw the cell divisions */ $myPicture->setShadow(FALSE); $Settings = array("R" => 0, "G" => 0, "B" => 0); $myPicture->drawLine(10, 110, 590, 110, $Settings); $myPicture->drawLine(200, 10, 200, 110, $Settings); $myPicture->drawLine(400, 10, 400, 110, $Settings); $myPicture->drawLine(10, 160, 590, 160, $Settings); $myPicture->drawLine(220, 160, 220, 200, $Settings); $myPicture->drawLine(320, 160, 320, 200, $Settings); $myPicture->drawLine(10, 200, 590, 200, $Settings); $myPicture->drawLine(400, 220, 400, 300, $Settings); /* Write the fields labels */ $myPicture->setFontProperties(array("FontName" => "../fonts/Forgotte.ttf", "FontSize" => 10)); $Settings = array("R" => 0, "G" => 0, "B" => 0, "Align" => TEXT_ALIGN_TOPLEFT); $myPicture->drawText(20, 20, "FROM", $Settings); $myPicture->drawText(210, 20, "TO", $Settings); $myPicture->drawText(20, 120, "ACCT.\r\nNUMBER", $Settings); $myPicture->drawText(20, 166, "QUANTITY", $Settings); $myPicture->drawText(230, 166, "SHIPMENT CODE", $Settings);