當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Font::setFontColor方法代碼示例

本文整理匯總了PHP中Font::setFontColor方法的典型用法代碼示例。如果您正苦於以下問題:PHP Font::setFontColor方法的具體用法?PHP Font::setFontColor怎麽用?PHP Font::setFontColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Font的用法示例。


在下文中一共展示了Font::setFontColor方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: showTestMode

 /**
  * Place watermark on the page if it is not licensed version
  * 
  * @param pdfWriter {@link PdfWriter}
  * @throws DocumentException
  */
 private static function showTestMode($pdfDocument, $pdfWriter)
 {
     if (self::isLicensed()) {
         return;
     }
     $font = new Font();
     $font->setFontSize(25);
     $font->setFontColor("#B5B5B5");
     $font->setFont($pdfWriter);
     $text = "WebORB PDF Gen Evaluation Copy";
     $width = $pdfWriter->GetStringWidth($text);
     $center["x"] = $pdfDocument->width / 2;
     if ($width / 2 > $center["x"]) {
         $width = $center["x"] * 2;
     }
     $center["y"] = $pdfDocument->height / 2;
     $pdfWriter->Rotate(45, $center["x"], $center["y"]);
     $pdfWriter->SetXY($center["x"] - $width / 2, $center["y"]);
     $pdfWriter->Cell($width, 36, $text, 0, 0, "C");
     $pdfWriter->Rotate(0, $center["x"], $center["y"]);
 }
開發者ID:sigmadesarrollo,項目名稱:logisoft,代碼行數:27,代碼來源:PDFUtil.php

示例2: Load

 public function Load()
 {
     parent::$PAGE_TITLE = __(HOME_PAGE_TITLE);
     // Welcome message
     $small_img = new Picture("img/logo_16x16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE);
     $title_header = new Object($small_img, __(WELCOME));
     $welcome_box = new Box($title_header, true, Box::STYLE_SECOND, Box::STYLE_SECOND, "", "welcome_box", 600);
     $welcome_obj = new Object(__(WELCOME_MSG));
     list($strAdminLogin, $strAdminPasswd, $strAdminRights) = getWspUserRightsInfo("admin");
     $quickstart_obj = new Object(new Picture("img/quickstart_128.png", 64, 64), "<br/>", __(QUICKSTART));
     $quickstart_link = new Link("http://www.website-php.com/" . $this->getLanguage() . "/quick-start.html", Link::TARGET_BLANK, $quickstart_obj);
     $quickstart_box = new RoundBox(3, "quickstart_box", 120, 120);
     $quickstart_box->setValign(RoundBox::VALIGN_CENTER);
     $quickstart_box->setContent($quickstart_link);
     $tutorial_obj = new Object(new Picture("img/tutorials_128.png", 64, 64), "<br/>", __(TUTORIALS));
     $tutorial_link = new Link("http://www.website-php.com/" . $this->getLanguage() . "/tutorials.html", Link::TARGET_BLANK, $tutorial_obj);
     $tutorial_box = new RoundBox(3, "tutorial_box", 120, 120);
     $tutorial_box->setValign(RoundBox::VALIGN_CENTER);
     $tutorial_box->setContent($tutorial_link);
     $connect_obj = new Object(new Picture("img/wsp-admin/admin_128.png", 64, 64), "<br/>", __(CONNECT));
     $connect_link = new Link("wsp-admin/connect.html", Link::TARGET_BLANK, $connect_obj);
     $connect_box = new RoundBox(3, "connect_box", 120, 120);
     $connect_box->setValign(RoundBox::VALIGN_CENTER);
     $connect_box->setContent($connect_link);
     $icon_table = new Table();
     $icon_table->setDefaultAlign(RowTable::ALIGN_CENTER)->setDefaultValign(RowTable::VALIGN_TOP);
     $icon_row = $icon_table->addRowColumns($quickstart_box, "&nbsp;", $tutorial_box, "&nbsp;", $connect_box);
     $icon_row->setColumnWidth(5, 120);
     if ($strAdminLogin == "admin" && $strAdminPasswd == sha1("admin")) {
         $finalize = new Font(__(FINALIZE_INSTALL));
         $finalize->setFontColor("red");
         $finalize->setFontWeight(Font::FONT_WEIGHT_BOLD);
         $welcome_obj->add("<br/>", $finalize, "<br/>", __(CONNECT_DEFAULT_PASSWD), "<br/>");
     }
     $welcome_obj->add("<br/>", $icon_table);
     $welcome_box->setContent($welcome_obj);
     // Footer
     $this->render = new Template($welcome_box);
 }
開發者ID:kxopa,項目名稱:WebSite-PHP,代碼行數:39,代碼來源:home.php

示例3: getFont

 public function getFont($newFontColor = -1, $newFontWeight = "", $newFontStyle = "")
 {
     $result = new Font();
     $result->setFontSize($this->fontSize);
     $result->setFontFamily($this->fontFamily);
     $result->setFontStyle($newFontWeight !== "" ? $newFontWeight : $this->fontWeight, $newFontStyle !== "" ? $newFontStyle : $this->fontStyle);
     $result->setFontColor($newFontColor !== -1 ? $newFontColor : $this->fontColor);
     return $result;
 }
開發者ID:sigmadesarrollo,項目名稱:logisoft,代碼行數:9,代碼來源:Component.php


注:本文中的Font::setFontColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。