<?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); ?>
|