note 68524 added to function.imagesetbrush
| From: | brent at ebrent dot net | Date: | Mon, 31 Jul 2006 17:54:44 +0000 |
| Subject: | note 68524 added to function.imagesetbrush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115380@lists.php.net to get a copy of this message | ||
Use a brush to create a thick line.
To create a 3x3 red brush:
<?php
$brush_size = 3;
$brush = imagecreatetruecolor($brush_size,$brush_size);
$brush_color = imagecolorallocate($brush,255,0,0);
imagefill($brush,0,0,$brush_color);
imagesetbrush($im,$brush);
?>
Then use imageline() or imagepolygon() with IMG_COLOR_BRUSHED as the color.
To stop using the brush, destroy it:
<?php imagedestroy($brush); ?>
The brush can also be created from an existing image.
----
Server IP: 64.71.164.2
Probable Submitter: 128.156.10.80
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.imagesetbrush.php
Edit -- https://master.php.net/note/edit/68524
Del: integrated -- https://master.php.net/note/delete/68524/integrated
Del: useless -- https://master.php.net/note/delete/68524/useless
Del: bad code -- https://master.php.net/note/delete/68524/bad+code
Del: spam -- https://master.php.net/note/delete/68524/spam
Del: non-english -- https://master.php.net/note/delete/68524/non-english
Del: in docs -- https://master.php.net/note/delete/68524/in+docs
Del: other reasons-- https://master.php.net/note/delete/68524
Reject -- https://master.php.net/note/reject/68524
Search -- https://master.php.net/manage/user-notes.php