Last commit for phpdoc/ImlibText.html: d0a9b9a03fc7ae74ef8a64593ac6b592526ec4d5

- initial import

pp [2004-05-19 04:59:31]
- initial import


git-svn-id: https://siedziba.pl:790/svn/repos/php-imlib/trunk@7 455248ca-bdda-0310-9134-f4ebb693071a
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Generated with PHPDoc, http://www.phpdoc.de -->
<html>
<head>
	<title>PHP Imlib2 Classes - Imlib - Class: ImlibText</title>
	<link href="phpdoc.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0">
	<tr>
		<td align="left" valign="top" bgcolor="#B0BAFF">
			<table width="100%">
				<tr>
					<td align="left" valign="top"><a href="phpdoc_packagelist.html">Packageindex</a></td>
					<td align="left" valign="top"><a href="phpdoc_classtree.html">Classtrees</a></td>
					<td align="left" valign="top"><a href="phpdoc_modulegroup.html">Modulegroups</a></td>
					<td align="left" valign="top"><a href="phpdoc_elementlist.html">Elementlist</a></td>
					<td align="left" valign="top"><a href="phpdoc_warnings.html">Report</a></td>
					<td align="left" valign="top"><a href="phpdoc_xmlfiles.html">XML Files</a></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td height="20" align="left" valign="top"><hr></td>
	</tr>
	<tr>
		<td align="left" valign="top">
			File: <a href="file:///home/matt/src/cvs/imlib/docs/class.ImlibText.php" target="_new">/home/matt/src/cvs/imlib/docs/class.ImlibText.php</a>
			<h5>PHP Imlib2 Classes - Imlib</h5>
			<h1>ImlibText</h1>
			<a href="ImlibColor.html">ImlibColor</a><br>&nbsp;&nbsp; |<br>&nbsp;&nbsp;+-- ImlibText<br>
			<p>
			Does everything relevant to text drawing
			<p>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td align="left" valign="top">
			<h4>public    class ImlibText extends <a href="ImlibColor.html">ImlibColor</a></h4>
			Does everything relevant to text drawing
			<br>
			The routine for dealing text is to load a font, set an image to draw on,and draw a string.
			<p>
			<table>


				<tr><td align="left" valign="top">Authors</td><td align="left" valign="top">Matt McClanahan &lt;<a href="mailto:cardinal@dodds.net">cardinal@dodds.net</a>&gt;</td></tr>

				<tr><td align="left" valign="top">Version</td><td align="left" valign="top">0.3</td></tr>



			</table>
		</td>
	</tr>
	<tr>
		<td height="10" align="left" valign="top">&nbsp;</td>
	</tr>

	<tr>
		<td height="20" align="left" valign="top"><hr></td>
	</tr>

	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td align="left" valign="top"><h3>Methods inherited from ImlibColor</h3></td>
				</tr>
				<tr>
					<td align="left" valign="top"><a href="ImlibColor.html#function_imlibcolor">imlibcolor</a>, <a href="ImlibColor.html#function_get_color">get_color</a>, <a href="ImlibColor.html#function_get_color_array">get_color_array</a>, <a href="ImlibColor.html#function_set_color">set_color</a>, <a href="ImlibColor.html#function_set_color_array">set_color_array</a></td>
				</tr>
			</table>
		</td>
	</tr>


	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td colspan="2" align="left" valign="top"><h2>Public Method Summary</h2></td>
				</tr>

				<tr>
					<td align="right" valign="top">void</td>
					<td align="left" valign="top" width="100%"><a href="#function_ImlibText()"><h4>ImlibText()</h4></a>ImlibText constructor</td>
				</tr>

				<tr>
					<td align="right" valign="top">bool</td>
					<td align="left" valign="top" width="100%"><a href="#function_draw()"><h4>draw(int $x, int $y, string $str, [ string $dir ])</h4></a>Draw a text string onto the current image</td>
				</tr>

				<tr>
					<td align="right" valign="top">bool</td>
					<td align="left" valign="top" width="100%"><a href="#function_free()"><h4>free()</h4></a>Free the currently loaded font</td>
				</tr>

				<tr>
					<td align="right" valign="top">integer</td>
					<td align="left" valign="top" width="100%"><a href="#function_get_image()"><h4>get_image()</h4></a>Get the current image resource id#</td>
				</tr>

				<tr>
					<td align="right" valign="top">bool</td>
					<td align="left" valign="top" width="100%"><a href="#function_get_size()"><h4>get_size(string $str, int &$w, int &$h, [ string $dir ])</h4></a>Get the width and height of a given string if it were drawn</td>
				</tr>

				<tr>
					<td align="right" valign="top">bool</td>
					<td align="left" valign="top" width="100%"><a href="#function_load()"><h4>load(string $path, string $font, int $size)</h4></a>Load a font</td>
				</tr>

				<tr>
					<td align="right" valign="top">void</td>
					<td align="left" valign="top" width="100%"><a href="#function_set_image()"><h4>set_image(int $im)</h4></a>Set the image resource id# to draw on</td>
				</tr>

			</table>
		</td>
	</tr>


	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td align="left" valign="top"><h3>Fields inherited from ImlibColor</h3></td>
				</tr>
				<tr>
					<td align="left" valign="top"><a href="ImlibColor.html#variable_$color">$color</a></td>
				</tr>
			</table>
		</td>
	</tr>


	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td colspan="2" align="left" valign="top"><h2>Private Field Summary</h2></td>
				</tr>

				<tr>
					<td align="right" valign="top">unknown</td>
					<td align="left" valign="top" width="100%"><a href="#variable_$fnt"><h4>$fnt</h4></a>Resource id# of the currently loaded font</td>
				</tr>

				<tr>
					<td align="right" valign="top">unknown</td>
					<td align="left" valign="top" width="100%"><a href="#variable_$im"><h4>$im</h4></a>Resource id# of the image to draw on</td>
				</tr>

			</table>
		</td>
	</tr>






	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td colspan="2" align="left" valign="top"><h2>Public Method Details</h2></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_ImlibText()"><h4>ImlibText</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    void ImlibText(  )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						ImlibText constructor
						<br>

						<p>

					</td>
				</tr>


				<tr>
					<td align="left" valign="top">Returns</td>
					<td>void <p></td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_draw()"><h4>draw</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    bool draw( int $x, int $y, string $str, [ string $dir ] )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Draw a text string onto the current image
						<br>

						<p>

					</td>
				</tr>

				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">int</td>
								<td align="left" valign="top">$x</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">coordinate of the upper left corner of the string</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">int</td>
								<td align="left" valign="top">$y</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">coordinate of the upper left corner of the string</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">string</td>
								<td align="left" valign="top">$str</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">string to draw</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">string</td>
								<td align="left" valign="top">$dir</td>
								<td align="left" valign="top"><code>= >>IMLIB_TEXT_TO_RIGHT<<</code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">of the text</td>
							</tr>
						</table>
					</td>
				</tr>



				<tr>
					<td align="left" valign="top">Returns</td>
					<td>bool <p>False if no font is loaded</td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_free()"><h4>free</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    bool free(  )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Free the currently loaded font
						<br>

						<p>

					</td>
				</tr>


				<tr>
					<td align="left" valign="top">Returns</td>
					<td>bool <p>False if no font is loaded</td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_get_image()"><h4>get_image</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    integer get_image(  )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Get the current image resource id#
						<br>

						<p>

					</td>
				</tr>


				<tr>
					<td align="left" valign="top">Returns</td>
					<td>integer <p>Image resource id#</td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_get_size()"><h4>get_size</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    bool get_size( string $str, int &$w, int &$h, [ string $dir ] )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Get the width and height of a given string if it were drawn
						<br>

						<p>

					</td>
				</tr>

				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">string</td>
								<td align="left" valign="top">$str</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">to measure</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">int</td>
								<td align="left" valign="top">&$w</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">Width the string would be</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">int</td>
								<td align="left" valign="top">&$h</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">Height the string would be</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">string</td>
								<td align="left" valign="top">$dir</td>
								<td align="left" valign="top"><code>= >>IMLIB_TEXT_TO_RIGHT<<</code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">to measure the string</td>
							</tr>
						</table>
					</td>
				</tr>



				<tr>
					<td align="left" valign="top">Returns</td>
					<td>bool <p>False if no font is loaded</td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_load()"><h4>load</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    bool load( string $path, string $font, int $size )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Load a font
						<br>
						If the font is in the font path, it can be referred to by font name,and the path does not need to be specified.  Otherwise, it must bereferred to by filename.
						<p>

					</td>
				</tr>

				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">string</td>
								<td align="left" valign="top">$path</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">, or current directory if passed blank</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">string</td>
								<td align="left" valign="top">$font</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">name</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">int</td>
								<td align="left" valign="top">$size</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">size</td>
							</tr>
						</table>
					</td>
				</tr>



				<tr>
					<td align="left" valign="top">Returns</td>
					<td>bool <p>False if no font is loaded</td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="function_set_image()"><h4>set_image</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>public    void set_image( int $im )</b><p>
					</td>
				</tr>
				<tr>
					<td width="10" align="left" valign="top">&nbsp;</td>
					<td align="left" valign="top">
						Set the image resource id# to draw on
						<br>

						<p>

					</td>
				</tr>

				<tr>
					<td colspan="2" align="left" valign="top">Parameter</td>
				</tr>

				<tr>
					<td></td>
					<td align="left" valign="top">
						<table>
							<tr>
								<td align="left" valign="top">int</td>
								<td align="left" valign="top">$im</td>
								<td align="left" valign="top"><code></code></td>
							</tr>
							<tr>
								<td></td>
								<td colspan="2" align="left" valign="top">resource id#</td>
							</tr>
						</table>
					</td>
				</tr>



				<tr>
					<td align="left" valign="top">Returns</td>
					<td>void <p></td>
				</tr>












				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

			</table>
	</tr>


	<tr>
		<td align="left" valign="top">
			<table width="100%" border="0">
				<tr>
					<td colspan="2" align="left" valign="top"><h2>Private Field Details</h2></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="variable_$fnt"><h4>$fnt</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>private   unknown $fnt</b>
						<p>
						>><code></code><<
						<p>
						Resource id# of the currently loaded font
						<br>

					</td>
				</tr>









				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

				<tr><td colspan="2" align="left" valign="top"><a name="variable_$im"><h4>$im</h4></a></td></tr>
				<tr>
					<td colspan="2" align="left" valign="top">
						<b>private   unknown $im</b>
						<p>
						>><code></code><<
						<p>
						Resource id# of the image to draw on
						<br>

					</td>
				</tr>









				<tr>
					<td colspan="2" align="left" valign="top"><hr></td>
				</tr>

			</table>
	</tr>



	<tr>
		<td height="10" align="left" valign="top"><hr></td>
	</tr>
	<tr>
		<td align="left" valign="top" bgcolor="#C0C0C0">
			<table>
				<tr>
					<td align="left" valign="top"><a href="phpdoc_packagelist.html">Packageindex</a></td>
					<td align="left" valign="top"><a href="phpdoc_classtree.html">Classtrees</a></td>
					<td align="left" valign="top"><a href="phpdoc_modulegroup.html">Modulegroups</a></td>
					<td align="left" valign="top"><a href="phpdoc_elementlist.html">Elementlist</a></td>
					<td align="left" valign="top"><a href="phpdoc_warnings.html">Report</a></td>
					<td align="left" valign="top"><a href="phpdoc_xmlfiles.html">XML Files</a></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td align="left" valign="top">PHPDoc 1.0beta</td>
	</tr>
</table>

</body>
</html>
ViewGit