本文整理汇总了PHP中Box::draw方法的典型用法代码示例。如果您正苦于以下问题:PHP Box::draw方法的具体用法?PHP Box::draw怎么用?PHP Box::draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box
的用法示例。
在下文中一共展示了Box::draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: draw
function draw()
{
global $__utime_start;
global $__debug_array;
debug($this, "Execution time (until debugWidget) :" . round(microtime_float() - $__utime_start, 3) . "s");
$arr =& $__debug_array;
$out .= "<table class=\"debug\"><tr><td class=\"debug_header\">Object</td><td class=\"debug_header\">Message</td></tr>";
for ($i = 0; $i < count($arr); $i++) {
$out .= "<tr><td class=\"debug_object\"><b>" . $arr[$i]["object"] . "</b></td><td class=\"debug_message\">" . $arr[$i]["message"] . "</td></tr>";
}
$out .= "</table>";
$box = new Box("ooCommon NG Debug");
$box->addWidget(html::write($out));
return $box->draw();
}
示例2: Box
imagecopyresized($img, $dotLayerImg, 840, 550, 0, 0, 200, 100, 200, 100);
//header text
$box = new Box($img);
$box->setFontFace(__DIR__ . '/fonts/Amatic-Bold.ttf');
$box->setFontColor($colorHeader);
$box->setFontSize(80);
$box->setLineHeight(1);
$box->setBox(580, 70, 480, 50);
$box->setTextAlign('center', 'center');
$box->draw($headerText);
//route box
$box = new Box($img);
$box->setFontFace(__DIR__ . '/fonts/Lato-Medium.ttf');
$box->setFontColor($colorRoute);
$box->setFontSize(21);
$box->setBox(600, 140, 460, 100);
$box->setTextAlign('center', 'center');
$box->draw($routeText);
//description box
$box = new Box($img);
$box->setFontFace(__DIR__ . '/fonts/Lato-Light.ttf');
$box->setFontColor($colorText);
$box->setFontSize(19);
$box->setLineHeight(1.4);
$box->setBox(630, 260, 440, 300);
$box->setTextAlign('center', 'top');
$box->draw($descriptionText);
//send photo to user
header('Content-type: image/jpeg');
header('Content-Disposition: inline; filename="day-' . $_POST['day'] . '.jpg"');
imagejpeg($img, null, 100);
示例3: date
$d = new date();
$d->timestamp = $sf->fecha_entrega;
$d->parse();
$f->addWidget(new form_html("Fecha Entrega", $d->string));
$elw = new estadolistwidget();
$elw->drop($sf);
$f->addWidget(new form_widget("Estado", "", $elw));
$f->addWidget(new form_separator("Datos adicionales"));
$f->addWidget(new form_textarea("otro_material", "Otros materiales", $sf->otro_material));
$f->addWidget(new form_textarea("observaciones", "Observaciones", $sf->observaciones));
$b2 = new Box("Datos Generales del Pedido");
$b2->addWidget($f);
$b3 = new Box("Eventos del Pedido");
$ev = new eventviewer();
$ev->drop($sf);
$b3->addWidget($ev);
$b->addWidget(html::write("<table style=\"width:100%;\"><tr><td valign=\"top\" style=\"width:40%;\">" . $b2->draw() . "</td><td valign=\"top\">" . $b3->draw() . "</td></tr></table>"));
$b->addWidget(html::write("<script> var idpedido='" . $sf->id . "';</script>"));
$p->addWidget($b);
$b = new Box("Detalle del Pedido");
if ($sf->tipo_pedido == 0 || $sf->tipo_pedido == 2) {
$b->addWidget(new puertas_paso($sf->estado < 1 ? true : false));
}
if ($sf->tipo_pedido == 0 || $sf->tipo_pedido == 2) {
$b->addWidget(new puertas_entrada($sf->estado < 1 ? true : false));
}
if ($sf->tipo_pedido == 1 || $sf->tipo_pedido == 2) {
$b->addWidget(new ventanas($sf->estado < 1 ? true : false));
}
$p->addWidget($b);
$p->draw();