mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-25 17:48:05 +02:00
6cee523f9d
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@189194 c90b9560-bf6c-de11-be94-00142212c4b1
89 lines
2.4 KiB
XML
89 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.11 $ -->
|
|
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry id="function.imagepolygon">
|
|
<refnamediv>
|
|
<refname>imagepolygon</refname>
|
|
<refpurpose>Dessine un polygone</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>imagepolygon</methodname>
|
|
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
|
|
<methodparam><type>array</type><parameter>points</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>num_points</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>color</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>imagepolygon</function> dessine un polygone dans l'image
|
|
<parameter>image</parameter>. <parameter>points</parameter> est un tableau
|
|
&php; qui contient les sommets du polygone sous la forme : points[0] = x0,
|
|
points[1] = y0, points[2] = x1, points[3] = y1, etc. num_points est le
|
|
nombre de sommets. <parameter>num_points</parameter>
|
|
est le nombre de points (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>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|