mkoppanen               Thu Aug 16 21:45:48 2007 UTC

  Modified files:              
    /phpdoc/en/reference/imagick/imagick        annotateimage.xml 
  Log:
  Added an example.
  
  
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/imagick/imagick/annotateimage.xml?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/en/reference/imagick/imagick/annotateimage.xml
diff -u phpdoc/en/reference/imagick/imagick/annotateimage.xml:1.4 
phpdoc/en/reference/imagick/imagick/annotateimage.xml:1.5
--- phpdoc/en/reference/imagick/imagick/annotateimage.xml:1.4   Wed Jun 20 
22:24:41 2007
+++ phpdoc/en/reference/imagick/imagick/annotateimage.xml       Thu Aug 16 
21:45:47 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry xmlns="http://docbook.org/ns/docbook"; 
xml:id="function.imagick-annotateimage">
  <refnamediv>
   <refname>Imagick::annotateImage</refname>
@@ -111,48 +111,58 @@
  </refsect1>
  -->
 
- <!-- Use when examples exist
  <refsect1 role="examples">
   &reftitle.examples;
   <para>
    <example>
-    <title>A <function>Imagick::annotateImage</function> example</title>
+    <title>Using <function>Imagick::annotateImage</function>:</title>
     <para>
-     Any text that describes the purpose of the example, or
-     what goes on in the example should go here (inside the
-     <example> tag, not out
+     Annotate text on an empty image
     </para>
     <programlisting role="php">
 <![CDATA[
 <?php
-if ($anexample === true) {
-    echo 'Use the PEAR Coding Standards';
-}
+/* Create some objects */
+$image = new Imagick();
+$draw = new ImagickDraw();
+$pixel = new ImagickPixel( 'gray' );
+
+/* New image */
+$image->newImage(800, 75, $pixel);
+
+/* Black text */
+$pixel->setColor('black');
+
+/* Font properties */
+$draw->setFont('Bookman-DemiItalic');
+$draw->setFontSize( 30 );
+
+/* Create text */
+$image->annotateImage($draw, 10, 45, 0, 'The quick brown fox jumps over the 
lazy dog');
+
+/* Give image a format */
+$image->setImageFormat('png');
+
+/* Output the image with headers */
+header('Content-type: image/png');
+echo $image;
+
 ?>
 ]]>
     </programlisting>
-    &example.outputs;
-    <screen>
-<![CDATA[
-Use the PEAR Coding Standards
-]]>
-    </screen>
    </example>
   </para>
  </refsect1>
- -->
 
- <!-- Use when adding See Also links
  <refsect1 role="seealso">
   &reftitle.seealso;
   <para>
    <simplelist>
-    <member><function></function></member>
-    <member>Or <link linkend="somethingelse">something else</link></member>
+    <member><function>ImagickDraw::annotation</function></member>
+    <member><function>ImagickDraw::setFont</function></member>
    </simplelist>
   </para>
  </refsect1>
- -->
 
 </refentry>
 

Reply via email to