8){ $debugfont = 'C:\WINDOWS\Fonts\verdana.ttf'; }elseif($rand > 4){ $debugfont = 'C:\WINDOWS\Fonts\ARIALN.TTF'; }else{ $debugfont = DEBUGFONT; } define(MARGINX,0); define(MARGINY,0); define(STRINGMARGIN,5); // define(TILINGMODE,'TILING'); define(TILINGMODE,'LATER'); // define(TILINGMODE,'FORCE'); //?file=../../data/divide/buffer_gene.txt&xml=./log/op4oe_gene.xml&log=./log/log4oe_gene.txt&width=800 //GET $buffer = $_GET[file]; if(!($buffer)){ $buffer = BUFFERFILE; } $log = $_GET[log]; if(!($log)){ $log = LOGFILE; } $xml = $_GET[xml]; if(!($xml)){ $xml = XMLFILE; } $width = $_GET[width]; if(!($width)){ $width = WIDTH; } $rowheight = $_GET[rowheight]; if(!($rowheight)){ $rowheight = ROWHEIGHT; } $bgcolor = $_GET[bgcolor]; if(!($bgcolor)){ $bgcolor = BGCOLOR; } $tiling = $_GET[tiling]; if(!($tiling)){ $tiling = TILINGMODE; } //オブジェクトの作成 $utgd = new UTGD4(); //フォント設定 $utgd->setFontFile(FONTFILE); //ログ設定 // $utgd->openLogFile($log,'INFO'); $utgd->openLogFile($log,''); //サイズの設定 $utgd->setImageSize($width,HEIGHT,ROWNUM,$rowheight,CHRSTART,CHREND,MARGINX,MARGINY); //その他オプション設定 $utgd->setImageOptions($bgcolor,MARGINCOLOR,STRINGMARGIN); // $utgd->setStringMargin(STRINGMARGIN); //デバッグ画像設定 $utgd->setDebugOptions(DEBUG,12,'black',NULL,$debugfont); //中間ファイルのパース $utgd->parseBufferFile($buffer,$tiling); //画像枠の作成 $utgd->createImage(); //XMLファイルオープン $utgd->openXMLFile($xml); //図形の描画 $utgd->drawImage(); //図形直接テスト // $utgd->drawLineYFolded(15000,16000,0,20,1,'black',1,25); //GDリソースの直接利用 // $image = $utgd->getImageResource(); // $sy = imagesy($image); // $col = imagecolorallocatealpha($image,0,255,0,100); // imagefilledrectangle($image,500,$sy-60,600,$sy-10,$col); //DEBUG描画テスト $utgd->addDebugMessage(" ",1); $utgd->addDebugMessage("this is",1); $utgd->addDebugMessage(" Debug Message."); $utgd->addDebugMessage("set 1 to 2nd argument",1); $utgd->addDebugMessage(" if you want to insert line feed."); //XML出力 $utgd->outputXMLFile(); //画像出力 $utgd->outputImage(); ?>