PHP 8.3.22 Released!

Voting

: max(five, two)?
(Example: nine)

The Note You're Voting On

martin at eksperimentrum dot dk
7 years ago
How to draw a simple 6-sided star img where x,y is center of the star and s is the size:

function drawStar($img, $x, $y, $s, $color) {
$x=$x-$s/2;
$y=$y-$s/4;
$points=array($x,$y, $x+$s/2,$y+$s, $x+$s,$y);
imagefilledpolygon($img, $points, 3, $color);
$points=array($x,2/3*$s+$y, $x+$s/2,$y-$s/3, $x+$s,2/3*$s+$y);
imagefilledpolygon($img, $points, 3, $color);
}

<< Back to user notes page

To Top