cvs: phpdoc-fr /reference/image/functions imagepolygon.xml

From: Date: Thu, 06 Nov 2003 11:05:46 +0000
Subject: cvs: phpdoc-fr /reference/image/functions imagepolygon.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-880@lists.php.net to get a copy of this message
didou Thu Nov 6 06:05:46 2003 EDT Modified files: /phpdoc-fr/reference/image/functions imagepolygon.xml Log: adding an example Index: phpdoc-fr/reference/image/functions/imagepolygon.xml diff -u phpdoc-fr/reference/image/functions/imagepolygon.xml:1.3 phpdoc-fr/reference/image/functions/imagepolygon.xml:1.4 --- phpdoc-fr/reference/image/functions/imagepolygon.xml:1.3 Thu May 29 06:25:39 2003 +++ phpdoc-fr/reference/image/functions/imagepolygon.xml Thu Nov 6 06:05:46 2003 @@ -23,6 +23,40 @@ nombre de sommets. </para> <para> + <example> + <title>Exemple avec <function>imagepolygon</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +// nouvelle image +$image = imagecreate(400,300); + +// couleur de fond +$bg = imagecolorallocate($image,0,0,0); + +// couleur pour les bords du polygone +$col_poly = imagecolorallocate($image,255,255,255); + +// on dessine le polygone +imagepolygon($image, + array ( + 0, 0, + 100, 200, + 300, 200 + ), + 3, + $col_poly); + +// on affiche l'image +header("Content-type: image/png"); +imagepng($image); + +?> +]]> + </programlisting> + </example> + </para> + <para> Voir aussi <function>imagecreate</function> et <function>imagecreatetruecolor</function>.

« previous php.doc.fr (#880) next »