Rapide Advanced Adulte
   imagefilledpolygon   
Resultatsimagefilledpolygon   |   Contact

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.gd info
.getimagesize
.image type to extension
.image type to mime type
.image2wbmp
.imagealphablending
.imageantialias
.imagearc
.imagechar
.imagecharup
.imagecolorallocate
.imagecolorallocatealpha
.imagecolorat
.imagecolorclosest
.imagecolorclosestalpha
.imagecolorclosesthwb
.imagecolordeallocate
.imagecolorexact
.imagecolorexactalpha
.imagecolormatch
.imagecolorresolve
.imagecolorresolvealpha
.imagecolorset
.imagecolorsforindex
.imagecolorstotal
.imagecolortransparent
.imageconvolution
.imagecopy
.imagecopymerge
.imagecopymergegray
.imagecopyresampled
.imagecopyresized
.imagecreate
.imagecreatefromgd2
.imagecreatefromgd2part
.imagecreatefromgd
.imagecreatefromgif
.imagecreatefromjpeg
.imagecreatefrompng
.imagecreatefromstring
.imagecreatefromwbmp
.imagecreatefromxbm
.imagecreatefromxpm
.imagecreatetruecolor
.imagedashedline
.imagedestroy
.imageellipse
.imagefill
.imagefilledarc
.imagefilledellipse
.imagefilledpolygon
.imagefilledrectangle
.imagefilltoborder
.imagefilter
.imagefontheight
.imagefontwidth
.imageftbbox
.imagefttext
.imagegammacorrect
.imagegd2
.imagegd
.imagegif
.imageinterlace
.imageistruecolor
.imagejpeg
.imagelayereffect
.imageline
.imageloadfont
.imagepalettecopy
.imagepng
.imagepolygon
.imagepsbbox
.imagepsencodefont
.imagepsextendfont
.imagepsfreefont
.imagepsloadfont
.imagepsslantfont
.imagepstext
.imagerectangle
.imagerotate
.imagesavealpha
.imagesetbrush
.imagesetpixel
.imagesetstyle
.imagesetthickness
.imagesettile
.imagestring
.imagestringup
.imagesx
.imagesy
.imagetruecolortopalette
.imagettfbbox
.imagettftext
.imagetypes
.imagewbmp
.imagexbm
.iptcembed
.iptcparse
.jpeg2wbmp
.png2wbmp
 
   

  imagefilledpolygon  


imagefilledpolygon

(PHP 3, PHP 4, PHP 5)

imagefilledpolygon -- Dessine un polygone rempli

Description

bool imagefilledpolygon ( resource image, array points, int num_points, int color )

imagefilledpolygon() dessine un polygone rempli dans l'image image.

Liste de paramètres

image

Une ressource d'image, retourné par une des fonctions de création d'images, comme imagecreatetruecolor().

points

Un tableau qui contient les coordonnées x et y du sommet des polygones.

num_points

Le nombre total de sommets, et doit être supérieur à 3.

color

Un identifiant de couleur, créé par la fonction imagecolorallocate()

Valeurs de retour

Cette fonction retourne TRUE en cas de succès, FALSE en cas d'échec.

Exemples

Exemple 1. Exemple avec imagefilledpolygon()

<?php
// Définition du tablau de points pour le polygone
$values = array(
            
40,  50,  // Point 1 (x, y)
            
20,  240, // Point 2 (x, y)
            
60,  60,  // Point 3 (x, y)
            
240, 20,  // Point 4 (x, y)
            
50,  40,  // Point 5 (x, y)
            
10,  10   // Point 6 (x, y)
            
);

// Création d'une image
$image = imagecreatetruecolor(250, 250);

// Quelques couleurs
$bg   = imagecolorallocate($image, 200, 200, 200);
$blue = imagecolorallocate($image, 0, 0, 255);

// Dessine le polygone
imagefilledpolygon($image, $values, 6, $blue);

// Affichage de l'image
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur