Reputation: 34556
Does anyone know a way to draw a filled path in PHP GD?
I can draw the outline no problem, with iterative calls to imageline
joining up the path points:
Filling it, though, so it looks like the below, I'm not sure GD provides any obvious means of filling non-trivial shapes:
Upvotes: 0
Views: 516
Reputation: 1756
you should use imagefilledpolygon
imagefilledpolygon — Draw a filled polygon
Description
bool imagefilledpolygon ( resource $image , array $points , int $num_points , int $color )
imagefilledpolygon() creates a filled polygon in the given image.
Upvotes: 1