In a shape, we can add
a fill()
instead of a stroke()
.
This would add a black background colour
to the shape. Take a look:
It doesn't even matter
if we have a closed shape. The
fill()
method will try to
close the shape for you and
then fill it. Take a look at
a shape, once created with
stroke()
and then with fill()
.
The shapes are the same.
You can see that even though
the shape isn't closed, fill()
works out for us.