svn: /phpdoc/en/trunk/reference/imagick/ examples.xml

From: Date: Sun, 16 Dec 2012 19:50:12 +0000
Subject: svn: /phpdoc/en/trunk/reference/imagick/ examples.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-10856@lists.php.net to get a copy of this message
googleguy Sun, 16 Dec 2012 19:50:12 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=328793 Log: Reverting revision 328792. Changed paths: U phpdoc/en/trunk/reference/imagick/examples.xml Modified: phpdoc/en/trunk/reference/imagick/examples.xml =================================================================== --- phpdoc/en/trunk/reference/imagick/examples.xml 2012-12-16 19:42:00 UTC (rev 328792) +++ phpdoc/en/trunk/reference/imagick/examples.xml 2012-12-16 19:50:12 UTC (rev 328793) @@ -209,64 +209,6 @@ </programlisting> </example> </para> - <para> - Working with ellipse primitive and custom fonts - <example> - <title>Create a PHP logo</title> - <programlisting role="php"> -<![CDATA[ -<?php -/* Set width and height in proportion of genuine PHP logo */ -$width = 400; -$height = 210; - -/* Create an Imagick object with transparent canvas */ -$img = new Imagick(); -$img->newImage($width, $height, new ImagickPixel('transparent')); - -/* New ImagickDraw instance for ellipse draw */ -$draw = new ImagickDraw(); -/* Set purple fill color for ellipse */ -$draw->setFillColor('#777bb4'); -/* Set ellipse dimensions */ -$draw->ellipse($width / 2, $height / 2, $width / 2, $height / 2, 0, 360); -/* Draw ellipse onto the canvas */ -$img->drawImage($draw); - -/* Reset fill color from purple to black for text (note: we are reusing ImagickDraw object) */ -$draw->setFillColor('black'); -/* Set stroke border to white color */ -$draw->setStrokeColor('white'); -/* Set stroke border thickness */ -$draw->setStrokeWidth(2); -/* Set font kerning (negative value means that letters are closer to each other) */ -$draw->setTextKerning(-8); -/* Set font and font size used in PHP logo */ -$draw->setFont('Handel Gothic.ttf'); -$draw->setFontSize(150); -/* Center text horizontally and vertically */ -$draw->setGravity(Imagick::GRAVITY_CENTER); - -/* Add center "php" with Y offset of -10 to canvas (inside ellipse) */ -$img->annotateImage($draw, 0, -10, 0, 'php'); -$img->setImageFormat('png'); - -/* Set appropriate header for PNG and output the image */ -header('Content-Type: image/png'); -echo $img; -?> - -]]> - </programlisting> - &example.outputs.similar; - <mediaobject> - <alt>Output of example : Creating PHP logo with Imagick</alt> - <imageobject> - <imagedata fileref="en/reference/imagick/figures/php_logo.png"/> - </imageobject> - </mediaobject> - </example> - </para> </section> </chapter>

« previous php.doc.cvs (#10856) next »