当前位置: 首页>>代码示例>>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;未经允许,请勿转载。