Name
filledPolygon( ) — draw previously defined polygon filled with a color
Synopsis
GD::Image::filledPolygon(polygon
,colorindex
)
The filledPolygon( )
method
is used the same
way you use the polygon( )
method, except that
the area defined by the polygon is filled with the given color. To
draw a filled polygon with the lines stroked in a different color,
use polygon( )
with the fill(
)
method or draw a second non-filled polygon on top of the
filled polygon. The colorindex may be either:
- A color index
The polygon will be filled with the specified color. If the color has been marked as transparent, the pixels will become transparent.
- gdTiled
The polygon will be filled with the pattern previously assigned as the current tile pattern with
setTile( )
. If the polygon is larger than the tile pattern, the tile pattern is repeated to fill the polygon.
Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.