note 88639 modified in function.imagesetthickness by danbrown
| From: | danbrown@php.net | Date: | Mon, 02 Feb 2009 19:00:00 +0000 |
| Subject: | note 88639 modified in function.imagesetthickness by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150118@lists.php.net to get a copy of this message | ||
Here is a custom function I wrote that addresses the line thickness issues with ellipses :
<?php
function draw_oval ($image, $pos_x, $pos_y, $elipse_width, $elipse_height, $color, $px_thick) {
$line = 0;
$thickness = $px_thick;
$elipse_w = $elipse_width;
$elipse_h = $elipse_height;
while ($line < $thickness) {
imageellipse($image, $pos_x, $pos_y, $elipse_w, $elipse_h, $color);
$line++;
$elipse_w--;
$elipse_h--;
}
}
?>
I hope you find this useful.
--was--
Here is a custom function I wrote that addresses the line thickness issues with ellipses :
function draw_oval ($image, $pos_x, $pos_y, $elipse_width, $elipse_height, $color, $px_thick) {
$line = 0;
$thickness = $px_thick;
$elipse_w = $elipse_width;
$elipse_h = $elipse_height;
while ($line < $thickness) {
imageellipse($image, $pos_x, $pos_y, $elipse_w, $elipse_h, $color);
$line++;
$elipse_w--;
$elipse_h--;
}
}
I hope you find this useful.
http://php.net/manual/en/function.imagesetthickness.php