Location: PHPKode > projects > Moc10 PHP Library > docs/api-glossary/image_text.html
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!-- Header //-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

    <title>
        Moc10 Library v1.9.7 | A Lightweight PHP Library
    </title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="author" content="Nick Sagona"/>
    <meta name="keywords" content="php, php library, php framework, php code library, moc10 library, moc10media, moc 10 media, moc 10, object oriented programming, oop" />
    <meta name="description" content="Moc10 Library is a lightweight, easily deployable PHP library that integrates a handful of some of the 'basics' that go into many websites, projects and applications." />
    <meta name="robots" content="all" />

    <link rel="stylesheet" type="text/css" href="../styles.css" />
    <link rel="shortcut icon" href="../moc10media.ico" type="image/ico" />

</head>

<body>
<!-- Content //-->
<div id="content">

    <h1>Moc10 Library v1.9.7 | A Lightweight PHP Library</h1>
    <ul id="mainNav">
        <li><a href="../index.html">Overview</a></li>
        <li><a href="../features.html">Features</a></li>
        <li><a href="../manual.html">Manual</a></li>
        <li>API Glossary</li>
        <li><a href="../api-docs/index.html">API Docs</a></li>
        <li><a href="../faqs.html">FAQs</a></li>
        <li><a href="../development.html">Development</a></li>
        <li><a href="../download.html">Download</a></li>
    </ul>
    <span class="right"><a href="../api-glossary.html">&lt; back to glossary</a></span>
    <h3>API Glossary &gt; The Image Component</h3>
    <h4>$image-&gt;text($str, $size, $x, $y, $rotate = null, $font = null, $r = null, $g = null, $b = null, $to = null)</h4>
    <pre>

@param  string $str        (Actual text size)
@param  int|string $size   (Font size of the text)
@param  int|string $x      (X position of the text)
@param  int|string $y      (Y position of the text)
@param  int|string $rotate (Rotation of the text)
@param  string $font       (Font of the text. Requires a true-type font.) 
@param  int|string $r      (Red value of the RGB color of the text, 0 through 255)
@param  int|string $g      (Green value of the RGB color of the text, 0 through 255)
@param  int|string $b      (Blue value of the RGB color of the text, 0 through 255)
@param  string $to         (New file to save to)
    </pre>
    <p>
        This method creates text within the an image object and outputs it. A true-type font file is required for the font argument. The size, rotation and position can be set by those respective arguments. The RGB color of the text can be set by the respective optional arguments. This is a useful method for creating CAPTCHA images or rendering sensitive information to the user that cannot or should not be rendered by HTML (i.e. email addresses.)
    </p>
</div>
<!-- Footer //-->
<div id="footer">
    Copyright &copy; 2009-2011, Moc 10 Media, LLC. All rights reserved.
</div>
</body>

</html>
Return current item: Moc10 PHP Library