Services webmasters
Partenaires
Jeux concours gratuits
 
imagesetpixel
<<<
imagesetstyle imagesetthickness
>>>

7.40 Images
7 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes prédefinies
Exemples
exif_imagetype
exif_read_data
exif_thumbnail
gd_info
getimagesize
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
imagecopy
imagecopymerge
imagecopymergegray
imagecopyresampled
imagecopyresized
imagecreate
imagecreatefromgd
imagecreatefromgd2
imagecreatefromgd2part
imagecreatefromgif
imagecreatefromjpeg
imagecreatefrompng
imagecreatefromstring
imagecreatefromwbmp
imagecreatefromxbm
imagecreatefromxpm
imagecreatetruecolor
imagedashedline
imagedestroy
imageellipse
imagefill
imagefilledarc
imagefilledellipse
.&nbs HREF="function.imagegammacorrect.php">imagegammacorrect
imagegd
imagegd2
imagegif
imageinterlace
imageistruecolor
imagejpeg
imageline
imageloadfont
imagepalettecopy
imagepng
imagepolygon
imagepsbbox
imagepscopyfont
imagepsencodefont
imagepsextendfont
imagepsfreefont
imagepsloadfont
imagepsslantfont
imagepstext
imagerectangle
imagerotate
imagesavealpha
imagesetbrush
imagesetpixel
->imagesetstyle
imagesetthickness
imagesettile
imagestring
imagestringup
imagesx
imagesy
imagetruecolortopalette
imagettfbbox
imagettftext
imagetypes
imagewbmp
iptcembed
iptcparse
jpeg2wbmp
png2wbmp
read_exif_data

7.40.91 imagesetstyle()Configure le style pour le dessin des lignes

[ Exemples avec imagesetstyle ]   PHP 4 >= 4.0.6

int  imagesetstyle ( resource   image , array   style )

imagesetstyle permet de choisir le style à utiliser lors du dessin des lignes (comme avec les fonctions imageline and imagepolygon ) lors de l'utilisation de la couleur spéciale IMG_COLOR_STYLED ou bien lors du dessin de lignes avec la couleur IMG_COLOR_STYLEDBRUSHED .

Le paramètre style est un tableau de pixels. L'exemple suivant dessine une ligne pointillée depuis le coin supérieur gauche vers le coin inférieur droit de l'image :
Exemple avec imagesetstyle

<?php
header
("Content-type: image/jpeg");
$im  = imagecreate (100, 100);
$w   = imagecolorallocate ($im, 255, 255, 255);
$red = imagecolorallocate ($im, 255, 0, 0);

/* Dessine une ligne pointillée de 5 pixels rouges, 5 pixels blancs */
$style = array ($red,$red,$red,$red,$red,$w,$w,$w,$w,$w);
imagesetstyle ($im, $style);
imageline ($im, 0, 0, 100, 100, IMG_COLOR_STYLED);

/* Dessine une lgine avec des smileys, en utilisant imagesetbrush() et imagesetstyle */
$style = array ($w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$w,$red);
imagesetstyle ($im, $style);
);
imagecolortransparent ($brush, $w2);
imagesetbrush ($im, $brush);
imageline ($im, 100, 0, 0, 100, IMG_COLOR_STYLEDBRUSHED);

imagejpeg ($im);
imagedestroy ($im);
?>

Note

Cette fonction a été ajoutée en PHP 4.0.6.

Voir aussi imagesetbrush et imageline .

<< imagesetstyle >>
imagesetpixel Images imagesetthickness
Services webmasters
Les manuels
 
CoursPHP.com - Reproduction interdite -