Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: GD Simple, Palette Background

by roboticus (Chancellor)
on Nov 08, 2017 at 05:22 UTC ( #1202944=note: print w/replies, xml ) Need Help??

in reply to GD Simple, Palette Background


In the docs for GD::Simple, it says that the $img->clear method clears the canvas by painting over it with the current background color. So I'd expect you should simply be able to do something like:

$img->bgcolor($your_color_variable); $img->clear(); ... the rest of your drawing code ...


When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: GD Simple, Palette Background
by watari_exd (Initiate) on Nov 08, 2017 at 05:32 UTC
    That worked beautifully. Thank you! I'm not sure how I missed that.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1202944]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2018-07-19 15:01 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (411 votes). Check out past polls.