function.imagettfbbox.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 208 行 · 第 1/2 页

HTML
208
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Give the bounding box of a text using TrueType fonts</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagetruecolortopalette.html">imagetruecolortopalette</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagettftext.html">imagettftext</a></div> <div class="up"><a href="ref.image.html">GD Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.imagettfbbox" class="refentry"> <div class="refnamediv">  <h1 class="refname">imagettfbbox</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imagettfbbox</span> &mdash; <span class="dc-title">Give the bounding box of a text using TrueType fonts</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">array</span> <span class="methodname"><b><b>imagettfbbox</b></b></span>    ( <span class="methodparam"><span class="type">float</span> <tt class="parameter">$size</tt></span>   , <span class="methodparam"><span class="type">float</span> <tt class="parameter">$angle</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$fontfile</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$text</tt></span>   )</div>  <p class="para rdfs-comment">   This function calculates and returns the bounding box in pixels   for a TrueType text.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">size</tt></i></span>     <dd>      <p class="para">       The font size. Depending on your version of GD, this should be       specified as the pixel size (GD1) or point size (GD2).      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">angle</tt></i></span>     <dd>      <p class="para">       Angle in degrees in which <i><tt class="parameter">text</tt></i> will be measured.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">fontfile</tt></i></span>     <dd>      <p class="para">       The name of the TrueType font file (can be a URL). Depending on       which version of the GD library that PHP is using, it may attempt to       search for files that do not begin with a leading &#039;/&#039; by appending       &#039;.ttf&#039; to the filename and searching along a library-defined font path.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">text</tt></i></span>     <dd>      <p class="para">       The string to be measured.      </p>     </dd>    </dt>   </dl>  </p> </div>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?