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


PHP Image_Canvas::setFont方法代碼示例

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


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

示例1: setFont

 /**
  * Sets the font options.
  *
  * The $font array may have the following entries:
  * 'type' = 'ttf' (TrueType) or omitted for default<br>
  * If 'type' = 'ttf' then the following can be specified<br>
  * 'size' = size in pixels<br>
  * 'angle' = the angle with which to write the text
  * 'file' = the .ttf file (either the basename, filename or full path)
  *
  * @param array $font The font options.
  */
 function setFont($fontOptions)
 {
     parent::setFont($fontOptions);
     if (!isset($this->_font['size'])) {
         $this->_font['size'] = 10;
     }
 }
開發者ID:Spark-Eleven,項目名稱:revive-adserver,代碼行數:19,代碼來源:SVG.php

示例2: setFont

 /**
  * Sets the font options.
  *
  * The $font array may have the following entries:
  *
  * 'ttf' = the .ttf file (either the basename, filename or full path)
  * If 'ttf' is specified, then the following can be specified
  *
  * 'size' = size in pixels
  *
  * 'angle' = the angle with which to write the text
  *
  * @param array $font The font options.
  */
 function setFont($fontOptions)
 {
     parent::setFont($fontOptions);
     if (!isset($this->_font['size'])) {
         $this->_font['size'] = 12;
     }
     if (!isset($this->_font['encoding'])) {
         $this->_font['encoding'] = 'winansi';
     }
     if (!isset($this->_font['color'])) {
         $this->_font['color'] = 'black';
     }
 }
開發者ID:ballistiq,項目名稱:revive-adserver,代碼行數:27,代碼來源:PDF.php

示例3: setFont

 /**
  * Sets the font options.
  *
  * The $font array may have the following entries:
  *
  * 'ttf' = the .ttf file (either the basename, filename or full path)
  * If 'ttf' is specified, then the following can be specified
  *
  * 'size' = size in pixels
  *
  * 'angle' = the angle with which to write the text
  *
  * @param array $font The font options.
  */
 function setFont($fontOptions)
 {
     parent::setFont($fontOptions);
     if (!isset($this->_font['size'])) {
         $this->_font['size'] = 12;
     }
     if (!isset($this->_font['encoding'])) {
         $this->_font['encoding'] = null;
     }
     if ($this->_font['name'] == 'Helvetica') {
         $this->_font['embed'] = 0;
     }
     if (!isset($this->_font['color'])) {
         $this->_font['color'] = 'black';
     }
 }
開發者ID:ronaldoof,項目名稱:geocloud2,代碼行數:30,代碼來源:PS.php


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